OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 DeviceOrientationInspectorAgent_h | 5 #ifndef DeviceOrientationInspectorAgent_h |
6 #define DeviceOrientationInspectorAgent_h | 6 #define DeviceOrientationInspectorAgent_h |
7 | 7 |
8 #include "core/inspector/InspectorBaseAgent.h" | 8 #include "core/inspector/InspectorBaseAgent.h" |
9 #include "wtf/text/WTFString.h" | 9 #include "wtf/text/WTFString.h" |
10 | 10 |
11 namespace WebCore { | 11 namespace WebCore { |
12 | 12 |
13 class Page; | 13 class Page; |
14 | 14 |
15 typedef String ErrorString; | 15 typedef String ErrorString; |
16 | 16 |
17 class DeviceOrientationInspectorAgent FINAL : public InspectorBaseAgent<DeviceOr
ientationInspectorAgent>, public InspectorBackendDispatcher::DeviceOrientationCo
mmandHandler { | 17 class DeviceOrientationInspectorAgent FINAL : public InspectorBaseAgent<DeviceOr
ientationInspectorAgent>, public InspectorBackendDispatcher::DeviceOrientationCo
mmandHandler { |
18 WTF_MAKE_NONCOPYABLE(DeviceOrientationInspectorAgent); | 18 WTF_MAKE_NONCOPYABLE(DeviceOrientationInspectorAgent); |
19 public: | 19 public: |
20 static void provideTo(Page*); | 20 static void provideTo(Page&); |
21 | 21 |
22 virtual ~DeviceOrientationInspectorAgent(); | 22 virtual ~DeviceOrientationInspectorAgent(); |
23 | 23 |
24 // Protocol methods. | 24 // Protocol methods. |
25 virtual void setDeviceOrientationOverride(ErrorString*, double, double, doub
le) OVERRIDE; | 25 virtual void setDeviceOrientationOverride(ErrorString*, double, double, doub
le) OVERRIDE; |
26 virtual void clearDeviceOrientationOverride(ErrorString*) OVERRIDE; | 26 virtual void clearDeviceOrientationOverride(ErrorString*) OVERRIDE; |
27 | 27 |
28 private: | 28 private: |
29 explicit DeviceOrientationInspectorAgent(Page*); | 29 explicit DeviceOrientationInspectorAgent(Page&); |
30 Page* m_page; | 30 Page& m_page; |
31 }; | 31 }; |
32 | 32 |
33 } // namespace WebCore | 33 } // namespace WebCore |
34 | 34 |
35 | 35 |
36 #endif // !defined(DeviceOrientationInspectorAgent_h) | 36 #endif // !defined(DeviceOrientationInspectorAgent_h) |
OLD | NEW |