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

Side by Side Diff: chrome/renderer/device_orientation_dispatcher.h

Issue 2858049: Chromium plumbing for Device Orientation. (Closed)
Patch Set: Fixes after try bot runs Created 10 years, 4 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 (c) 2010 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 CHROME_RENDERER_DEVICE_ORIENTATION_DISPATCHER_H_
6 #define CHROME_RENDERER_DEVICE_ORIENTATION_DISPATCHER_H_
7
8 #include "third_party/WebKit/WebKit/chromium/public/WebDeviceOrientationClient.h "
9
10 #include "chrome/common/render_messages.h"
11
12 class RenderView;
13 namespace IPC { class Message; }
14
15 class DeviceOrientationDispatcher : public WebKit::WebDeviceOrientationClient {
16 public:
17 explicit DeviceOrientationDispatcher(RenderView* render_view);
18 virtual ~DeviceOrientationDispatcher();
19
20 bool OnMessageReceived(const IPC::Message& msg);
21
22 // From WebKit::WebDeviceOrientationClient.
23 virtual void setController(
24 WebKit::WebDeviceOrientationController* controller);
25 virtual void startUpdating();
26 virtual void stopUpdating();
27 virtual WebKit::WebDeviceOrientation lastOrientation() const;
28
29 private:
30 void OnDeviceOrientationUpdated(
31 const ViewMsg_DeviceOrientationUpdated_Params& p);
32
33 RenderView* render_view_;
34 scoped_ptr<WebKit::WebDeviceOrientationController> controller_;
35 scoped_ptr<ViewMsg_DeviceOrientationUpdated_Params> last_update_;
36 bool started_;
37 };
38
39 #endif // CHROME_RENDERER_DEVICE_ORIENTATION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/device_orientation_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698