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

Side by Side Diff: content/renderer/screen_orientation/screen_orientation_dispatcher.h

Issue 176963016: Chromium plumbing for Screen Orientation API orientationchange events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 9 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 #ifndef CONTENT_RENDERER_SCREEN_ORIENTATION_DISPATCHER_H_
6 #define CONTENT_RENDERER_SCREEN_ORIENTATION_DISPATCHER_H_
7
8 #include "base/macros.h"
9 #include "content/public/renderer/render_process_observer.h"
10 #include "third_party/WebKit/public/platform/WebScreenOrientation.h"
11
12 namespace blink {
13 class WebScreenOrientationListener;
14 }
15
16 namespace content {
17
18 class RenderThread;
19
20 // ScreenOrientationDispatcher listens to message from the browser process and
21 // dispatch the orientation change ones to the WebScreenOrientationListener.
22 class CONTENT_EXPORT ScreenOrientationDispatcher
23 : public RenderProcessObserver {
24 public:
25 explicit ScreenOrientationDispatcher(RenderThread*);
26 virtual ~ScreenOrientationDispatcher() {}
27
28 // RenderProcessObserver
29 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
30
31 void setListener(blink::WebScreenOrientationListener* listener);
32
33 private:
34 void OnOrientationChange(blink::WebScreenOrientation orientation);
35
36 blink::WebScreenOrientationListener* listener_;
37
38 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcher);
39 };
40
41 } // namespace content
42
43 #endif // CONTENT_RENDERER_SCREEN_ORIENTATION_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698