Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / content / renderer / screen_orientation / screen_orientation_dispatcher.h
blob5aadd6e52887de6340432a91c82797fc5a87b120
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.
5 #ifndef CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_
6 #define CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_
8 #include "base/macros.h"
9 #include "content/public/renderer/render_process_observer.h"
10 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
12 namespace blink {
13 class WebScreenOrientationListener;
16 namespace content {
18 class RenderThread;
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() {}
28 // RenderProcessObserver
29 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
31 void setListener(blink::WebScreenOrientationListener* listener);
33 private:
34 void OnOrientationChange(blink::WebScreenOrientationType orientation);
36 blink::WebScreenOrientationListener* listener_;
38 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcher);
41 } // namespace content
43 #endif // CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_