summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp')
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
index 2267d66a9..8e4f2a11d 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
@@ -54,6 +54,7 @@
#include <WebCore/JSDOMWindow.h>
#include <WebCore/Page.h>
#include <WebCore/PageGroup.h>
+#include <WebCore/PageVisibilityState.h>
#include <WebCore/PrintContext.h>
#include <WebCore/ResourceHandle.h>
#include <WebCore/ScriptController.h>
@@ -138,7 +139,8 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
macro(WebKitUsesPageCachePreferenceKey, UsesPageCache, usesPageCache) \
macro(WebKitWebAudioEnabled, WebAudioEnabled, webAudioEnabled) \
macro(WebKitWebGLEnabled, WebGLEnabled, webGLEnabled) \
- macro(WebKitXSSAuditorEnabled, XSSAuditorEnabled, xssAuditorEnabled)
+ macro(WebKitXSSAuditorEnabled, XSSAuditorEnabled, xssAuditorEnabled) \
+ macro(WebKitShouldRespectImageOrientation, ShouldRespectImageOrientation, shouldRespectImageOrientation)
if (preference == "WebKitAcceleratedCompositingEnabled")
enabled = enabled && LayerTreeHost::supportsAcceleratedCompositing();
@@ -195,11 +197,11 @@ void InjectedBundle::setFrameFlatteningEnabled(WebPageGroupProxy* pageGroup, boo
void InjectedBundle::setGeoLocationPermission(WebPageGroupProxy* pageGroup, bool enabled)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
- static_cast<GeolocationClientMock*>((*iter)->geolocationController()->client())->setPermission(enabled);
-#endif
+ static_cast<GeolocationClientMock*>(GeolocationController::from(*iter)->client())->setPermission(enabled);
+#endif // ENABLE(GEOLOCATION)
}
void InjectedBundle::setJavaScriptCanAccessClipboard(WebPageGroupProxy* pageGroup, bool enabled)
@@ -456,4 +458,13 @@ void InjectedBundle::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC:
ASSERT_NOT_REACHED();
}
+void InjectedBundle::setPageVisibilityState(WebPageGroupProxy* pageGroup, int state, bool isInitialState)
+{
+#if ENABLE(PAGE_VISIBILITY_API)
+ const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
+ for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
+ (*iter)->setVisibilityState(static_cast<PageVisibilityState>(state), isInitialState);
+#endif
+}
+
} // namespace WebKit