summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2015-03-10 17:36:39 +0000
committerTorne (Richard Coles) <torne@google.com>2015-03-10 17:36:39 +0000
commit1cf285d3a90e0da7d28f7e73651391f212d2a4a8 (patch)
treec5c64ac91f3bfc6e1f9ef82edb03f2988e9407bc
parent3dbfef37be99c8cf90a316f7125fe5bbaa1356d8 (diff)
downloadchromium_org-1cf285d3a90e0da7d28f7e73651391f212d2a4a8.tar.gz
Disable orientation locking support in WebView.webview-m40_r3
The orientation lock code was accidentally inherited from Chrome and doesn't actually work in WebView. Make it actually fail when JS calls it, instead of claiming to work but doing nothing, by disabling the screen orientation provider. This puts WebView in the same state as desktop chrome which also doesn't set the provider. Tested that this results in correctly reported errors when JS tries to use the API. Bug: 19672531 Change-Id: I66a142fc50fa12db418b9465c6f29914633bd9b2
-rw-r--r--content/browser/browser_main_loop.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index c7dd81bcf3..4b8fa202d5 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -541,6 +541,9 @@ void BrowserMainLoop::MainMessageLoopStart() {
SurfaceTextureManager::InitInstance(new BrowserSurfaceTextureManager);
}
+#if 0
+ // Screen orientation lock doesn't work on WebView yet. Skip setting the
+ // delegate to force all lock attempts to report failure to calling JS code.
{
TRACE_EVENT0("startup",
"BrowserMainLoop::Subsystem:ScreenOrientationProvider");
@@ -549,6 +552,7 @@ void BrowserMainLoop::MainMessageLoopStart() {
ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get());
}
#endif
+#endif
if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) {
TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver");