| 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 "core/inspector/protocol/DeviceOrientation.h" | 9 #include "core/inspector/protocol/DeviceOrientation.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 class MODULES_EXPORT DeviceOrientationInspectorAgent final | 18 class MODULES_EXPORT DeviceOrientationInspectorAgent final |
| 19 : public InspectorBaseAgent<protocol::DeviceOrientation::Metainfo> { | 19 : public InspectorBaseAgent<protocol::DeviceOrientation::Metainfo> { |
| 20 WTF_MAKE_NONCOPYABLE(DeviceOrientationInspectorAgent); | 20 WTF_MAKE_NONCOPYABLE(DeviceOrientationInspectorAgent); |
| 21 | 21 |
| 22 public: | 22 public: |
| 23 static DeviceOrientationInspectorAgent* create(Page*); | 23 static DeviceOrientationInspectorAgent* create(Page*); |
| 24 | 24 |
| 25 ~DeviceOrientationInspectorAgent() override; | 25 ~DeviceOrientationInspectorAgent() override; |
| 26 DECLARE_VIRTUAL_TRACE(); | 26 DECLARE_VIRTUAL_TRACE(); |
| 27 | 27 |
| 28 // Protocol methods. | 28 // Protocol methods. |
| 29 void setDeviceOrientationOverride(ErrorString*, | 29 Response setDeviceOrientationOverride(double, double, double) override; |
| 30 double, | 30 Response clearDeviceOrientationOverride() override; |
| 31 double, | |
| 32 double) override; | |
| 33 void clearDeviceOrientationOverride(ErrorString*) override; | |
| 34 | 31 |
| 35 // Inspector Controller API. | 32 // Inspector Controller API. |
| 36 void disable(ErrorString*) override; | 33 Response disable() override; |
| 37 void restore() override; | 34 void restore() override; |
| 38 void didCommitLoadForLocalFrame(LocalFrame*) override; | 35 void didCommitLoadForLocalFrame(LocalFrame*) override; |
| 39 | 36 |
| 40 private: | 37 private: |
| 41 explicit DeviceOrientationInspectorAgent(Page&); | 38 explicit DeviceOrientationInspectorAgent(Page&); |
| 42 DeviceOrientationController& controller(); | 39 DeviceOrientationController& controller(); |
| 43 Member<Page> m_page; | 40 Member<Page> m_page; |
| 44 }; | 41 }; |
| 45 | 42 |
| 46 } // namespace blink | 43 } // namespace blink |
| 47 | 44 |
| 48 #endif // !defined(DeviceOrientationInspectorAgent_h) | 45 #endif // !defined(DeviceOrientationInspectorAgent_h) |
| OLD | NEW |