Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 398013002: Poll for Display rotation on Android 4.0 and 4.1 when needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: call ScreenOrientationListener on UI thread Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_webkitplatformsupport_impl.cc
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index b582f816bc51512638fa89dedc382044cdf55b34..be63bb3d59637a740c729c8b774aad1f506885d1 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -33,6 +33,7 @@
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
#include "content/common/mime_registry_messages.h"
+#include "content/common/screen_orientation_messages.h"
#include "content/common/view_messages.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/webplugininfo.h"
@@ -1074,6 +1075,9 @@ void RendererWebKitPlatformSupportImpl::startListening(
SetGamepadListener(
static_cast<blink::WebGamepadListener*>(listener));
break;
+ case blink::WebPlatformEventScreenOrientation:
+ RenderThread::Get()->Send(new ScreenOrientationHostMsg_StartListening());
+ break;
default:
// A default statement is required to prevent compilation errors when Blink
// adds a new type.
@@ -1100,6 +1104,9 @@ void RendererWebKitPlatformSupportImpl::stopListening(
case blink::WebPlatformEventGamepad:
SetGamepadListener(0);
break;
+ case blink::WebPlatformEventScreenOrientation:
+ RenderThread::Get()->Send(new ScreenOrientationHostMsg_StopListening());
+ break;
default:
// A default statement is required to prevent compilation errors when Blink
// adds a new type.
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698