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

Unified Diff: content/browser/screen_orientation/screen_orientation_dispatcher_host.cc

Issue 164913004: Chromium plumbing for Screen Orientation API orientationchange events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make chromium-style checks happy Created 6 years, 10 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
Index: content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc b/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
new file mode 100644
index 0000000000000000000000000000000000000000..98d4def33664dc5e99c02b26121db9a83a781d0a
--- /dev/null
+++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
@@ -0,0 +1,29 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/screen_orientation/screen_orientation_dispatcher_host.h"
+
+#include "content/common/screen_orientation_messages.h"
+
+namespace content {
+
+ScreenOrientationDispatcherHost::ScreenOrientationDispatcherHost()
+ : BrowserMessageFilter(ScreenOrientationMsgStart) {
+}
+
+bool ScreenOrientationDispatcherHost::OnMessageReceived(
+ const IPC::Message& message, bool* message_was_ok) {
+ // TODO(mlamouri): we will handle lock and unlock requests here.
+ return false;
+}
+
+void ScreenOrientationDispatcherHost::OnOrientationChange(
+ int orientation) {
+ // TODO(mlamouri): we might want to have OrientationChangeEvent to pass us
+ // a WebScreenOrientation instead of an int so we can let the backend decide
+ // of the relation between angle and orientation name.
+ Send(new ScreenOrientationMsg_OrientationChange(orientation));
ostap 2014/02/20 20:51:12 The RenderView on renderer side already has OnOrie
mlamouri (slow - plz ping) 2014/02/20 21:07:05 The idea is to merge window.orientation and screen
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698