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/InspectorFrontend.h" | 8 #include "core/InspectorFrontend.h" |
9 #include "core/inspector/InspectorBaseAgent.h" | 9 #include "core/inspector/InspectorBaseAgent.h" |
10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
11 #include "wtf/text/WTFString.h" | 11 #include "wtf/text/WTFString.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class DeviceOrientationController; | 15 class DeviceOrientationController; |
16 class Page; | 16 class Page; |
17 | 17 |
18 typedef String ErrorString; | 18 typedef String ErrorString; |
19 | 19 |
20 class MODULES_EXPORT DeviceOrientationInspectorAgent final : public InspectorBas
eAgent<DeviceOrientationInspectorAgent, InspectorFrontend::DeviceOrientation>, p
ublic InspectorBackendDispatcher::DeviceOrientationCommandHandler { | 20 class MODULES_EXPORT DeviceOrientationInspectorAgent final : public InspectorBas
eAgent<DeviceOrientationInspectorAgent, InspectorFrontend::DeviceOrientation>, p
ublic InspectorBackendDispatcher::DeviceOrientationCommandHandler { |
21 WTF_MAKE_NONCOPYABLE(DeviceOrientationInspectorAgent); | 21 WTF_MAKE_NONCOPYABLE(DeviceOrientationInspectorAgent); |
22 public: | 22 public: |
23 static PassOwnPtrWillBeRawPtr<DeviceOrientationInspectorAgent> create(Page*)
; | 23 static PassOwnPtrWillBeRawPtr<DeviceOrientationInspectorAgent> create(Page*)
; |
24 | 24 |
25 virtual ~DeviceOrientationInspectorAgent(); | 25 ~DeviceOrientationInspectorAgent() override; |
26 | 26 |
27 // Protocol methods. | 27 // Protocol methods. |
28 virtual void setDeviceOrientationOverride(ErrorString*, double, double, doub
le) override; | 28 void setDeviceOrientationOverride(ErrorString*, double, double, double) over
ride; |
29 virtual void clearDeviceOrientationOverride(ErrorString*) override; | 29 void clearDeviceOrientationOverride(ErrorString*) override; |
30 | 30 |
31 // Inspector Controller API. | 31 // Inspector Controller API. |
32 void disable(ErrorString*) override; | 32 void disable(ErrorString*) override; |
33 void restore() override; | 33 void restore() override; |
34 void didCommitLoadForLocalFrame(LocalFrame*) override; | 34 void didCommitLoadForLocalFrame(LocalFrame*) override; |
35 | 35 |
36 private: | 36 private: |
37 explicit DeviceOrientationInspectorAgent(Page&); | 37 explicit DeviceOrientationInspectorAgent(Page&); |
38 DeviceOrientationController& controller(); | 38 DeviceOrientationController& controller(); |
39 Page& m_page; | 39 Page& m_page; |
40 }; | 40 }; |
41 | 41 |
42 } // namespace blink | 42 } // namespace blink |
43 | 43 |
44 | 44 |
45 #endif // !defined(DeviceOrientationInspectorAgent_h) | 45 #endif // !defined(DeviceOrientationInspectorAgent_h) |
OLD | NEW |