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..f628b881c1cde258135e66927c5448af9c179878 |
--- /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 true; |
jochen (gone - plz use gerrit)
2014/02/20 16:11:04
should return false if the message wasn't handled
mlamouri (slow - plz ping)
2014/02/20 16:32:47
Gasp. That's what I meant :)
|
+} |
+ |
+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)); |
jochen (gone - plz use gerrit)
2014/02/20 16:11:04
DCHECK that orientation is a valid value?
What wi
mlamouri (slow - plz ping)
2014/02/20 16:32:47
Shouldn't the dispatcher just dispatch? This value
|
+} |
+ |
+} // namespace content |