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

Side by Side 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: updated 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host. h"
6
7 #include "content/common/screen_orientation_messages.h"
8
9 namespace content {
10
11 ScreenOrientationDispatcherHost::ScreenOrientationDispatcherHost()
12 : BrowserMessageFilter(ScreenOrientationMsgStart) {
13 }
14
15 bool ScreenOrientationDispatcherHost::OnMessageReceived(
16 const IPC::Message& message, bool* message_was_ok) {
17 // TODO(mlamouri): we will handle lock and unlock requests here.
18 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 :)
19 }
20
21 void ScreenOrientationDispatcherHost::OnOrientationChange(
22 int orientation) {
23 // TODO(mlamouri): we might want to have OrientationChangeEvent to pass us
24 // a WebScreenOrientation instead of an int so we can let the backend decide
25 // of the relation between angle and orientation name.
26 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
27 }
28
29 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698