summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-14 16:29:47 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-14 16:29:47 +0200
commitd0424a769059c84ae20beb3c217812792ea6726b (patch)
tree6f94a5c3db8c52c6694ee56498542a6c35417350 /Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
parent88a04ac016f57c2d78e714682445dff2e7db4ade (diff)
downloadqtwebkit-d0424a769059c84ae20beb3c217812792ea6726b.tar.gz
Imported WebKit commit 37c5e5041d39a14ea0d429a77ebd352e4bd26516 (http://svn.webkit.org/repository/webkit/trunk@128608)
New snapshot that enables WebKit2 build on Windows (still some bugs) and allows for WebKit to be built with qmake && make
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp')
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
index cd0634906..a7de64e8a 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
@@ -67,6 +67,7 @@
#include <WebCore/SecurityPolicy.h>
#include <WebCore/Settings.h>
#include <WebCore/UserGestureIndicator.h>
+#include <WebCore/WorkerThread.h>
#include <wtf/OwnArrayPtr.h>
#include <wtf/PassOwnArrayPtr.h>
@@ -358,6 +359,26 @@ void InjectedBundle::setApplicationCacheOriginQuota(const String& originString,
cacheStorage().storeUpdatedQuotaForOrigin(origin.get(), bytes);
}
+void InjectedBundle::resetApplicationCacheOriginQuota(const String& originString)
+{
+ RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
+ cacheStorage().storeUpdatedQuotaForOrigin(origin.get(), cacheStorage().defaultOriginQuota());
+}
+
+PassRefPtr<ImmutableArray> InjectedBundle::originsWithApplicationCache()
+{
+ HashSet<RefPtr<SecurityOrigin>, SecurityOriginHash> origins;
+ cacheStorage().getOriginsWithCache(origins);
+ Vector< RefPtr<APIObject> > originsVector;
+
+ HashSet<RefPtr<SecurityOrigin>, SecurityOriginHash>::iterator it = origins.begin();
+ HashSet<RefPtr<SecurityOrigin>, SecurityOriginHash>::iterator end = origins.end();
+ for ( ; it != end; ++it)
+ originsVector.append(WebString::create((*it)->databaseIdentifier()));
+
+ return ImmutableArray::adopt(originsVector);
+}
+
int InjectedBundle::numberOfPages(WebFrame* frame, double pageWidthInPixels, double pageHeightInPixels)
{
Frame* coreFrame = frame ? frame->coreFrame() : 0;
@@ -570,6 +591,15 @@ void InjectedBundle::setPageVisibilityState(WebPage* page, int state, bool isIni
#endif
}
+size_t InjectedBundle::workerThreadCount()
+{
+#if ENABLE(WORKERS)
+ return WebCore::WorkerThread::workerThreadCount();
+#else
+ return 0;
+#endif
+}
+
void InjectedBundle::setUserStyleSheetLocation(WebPageGroupProxy* pageGroup, const String& location)
{
const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
@@ -616,4 +646,9 @@ uint64_t InjectedBundle::webNotificationID(JSContextRef jsContext, JSValueRef js
#endif
}
+void InjectedBundle::setTabKeyCyclesThroughElements(WebPage* page, bool enabled)
+{
+ page->corePage()->setTabKeyCyclesThroughElements(enabled);
+}
+
} // namespace WebKit