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

Unified Diff: chrome/renderer/render_view.cc

Issue 2858049: Chromium plumbing for Device Orientation. (Closed)
Patch Set: Fixes after try bot runs Created 10 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 | « chrome/renderer/render_view.h ('k') | chrome/test/data/device_orientation/device_orientation_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 517cc3b3637033c7de0c40f50d446f05557521a5..fbc73ed6bf94c7010c46c1ca98868af0925ed4d7 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -43,6 +43,7 @@
#include "chrome/renderer/about_handler.h"
#include "chrome/renderer/audio_message_filter.h"
#include "chrome/renderer/blocked_plugin.h"
+#include "chrome/renderer/device_orientation_dispatcher.h"
#include "chrome/renderer/devtools_agent.h"
#include "chrome/renderer/devtools_client.h"
#include "chrome/renderer/extension_groups.h"
@@ -654,6 +655,10 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
speech_input_dispatcher_->OnMessageReceived(message)) {
return;
}
+ if (device_orientation_dispatcher_.get() &&
+ device_orientation_dispatcher_->OnMessageReceived(message)) {
+ return;
+ }
IPC_BEGIN_MESSAGE_MAP(RenderView, message)
IPC_MESSAGE_HANDLER(ViewMsg_CaptureThumbnail, OnCaptureThumbnail)
@@ -5400,6 +5405,12 @@ WebKit::WebSpeechInputController* RenderView::speechInputController(
return speech_input_dispatcher_.get();
}
+WebKit::WebDeviceOrientationClient* RenderView::deviceOrientationClient() {
+ if (!device_orientation_dispatcher_.get())
+ device_orientation_dispatcher_.reset(new DeviceOrientationDispatcher(this));
+ return device_orientation_dispatcher_.get();
+}
+
bool RenderView::IsNonLocalTopLevelNavigation(
const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) {
// Must be a top level frame.
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/test/data/device_orientation/device_orientation_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698