| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_DEVICE_ORIENTATION_DISPATCHER_H_ | 5 #ifndef CONTENT_RENDERER_DEVICE_ORIENTATION_DISPATCHER_H_ |
| 6 #define CONTENT_RENDERER_DEVICE_ORIENTATION_DISPATCHER_H_ | 6 #define CONTENT_RENDERER_DEVICE_ORIENTATION_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientationC
lient.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientationC
lient.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientation.
h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientation.
h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // RenderView::Observer implementation. | 25 // RenderView::Observer implementation. |
| 26 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 26 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 27 | 27 |
| 28 // From WebKit::WebDeviceOrientationClient. | 28 // From WebKit::WebDeviceOrientationClient. |
| 29 virtual void setController( | 29 virtual void setController( |
| 30 WebKit::WebDeviceOrientationController* controller); | 30 WebKit::WebDeviceOrientationController* controller); |
| 31 virtual void startUpdating(); | 31 virtual void startUpdating(); |
| 32 virtual void stopUpdating(); | 32 virtual void stopUpdating(); |
| 33 virtual WebKit::WebDeviceOrientation lastOrientation() const; | 33 virtual WebKit::WebDeviceOrientation lastOrientation() const; |
| 34 | 34 |
| 35 // TODO(aousterh): modify lastOrientation to return a |
| 36 // WebKit::WebDeviceOrientationData then remove this function |
| 37 // once it is no longer called from WebKit |
| 38 virtual WebKit::WebDeviceOrientation lastOrientationNew() const; |
| 39 |
| 35 void OnDeviceOrientationUpdated( | 40 void OnDeviceOrientationUpdated( |
| 36 const DeviceOrientationMsg_Updated_Params& p); | 41 const DeviceOrientationMsg_Updated_Params& p); |
| 37 | 42 |
| 38 scoped_ptr<WebKit::WebDeviceOrientationController> controller_; | 43 scoped_ptr<WebKit::WebDeviceOrientationController> controller_; |
| 39 WebKit::WebDeviceOrientation last_orientation_; | 44 WebKit::WebDeviceOrientation last_orientation_; |
| 40 bool started_; | 45 bool started_; |
| 41 }; | 46 }; |
| 42 | 47 |
| 43 #endif // CONTENT_RENDERER_DEVICE_ORIENTATION_DISPATCHER_H_ | 48 #endif // CONTENT_RENDERER_DEVICE_ORIENTATION_DISPATCHER_H_ |
| OLD | NEW |