summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.h')
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.h b/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.h
new file mode 100644
index 00000000000..a77363f055d
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.h
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DeviceOrientationInspectorAgent_h
+#define DeviceOrientationInspectorAgent_h
+
+#include "core/inspector/InspectorBaseAgent.h"
+#include "wtf/text/WTFString.h"
+
+namespace WebCore {
+
+class DeviceOrientationController;
+class Page;
+
+typedef String ErrorString;
+
+class DeviceOrientationInspectorAgent FINAL : public InspectorBaseAgent<DeviceOrientationInspectorAgent>, public InspectorBackendDispatcher::DeviceOrientationCommandHandler {
+ WTF_MAKE_NONCOPYABLE(DeviceOrientationInspectorAgent);
+public:
+ static void provideTo(Page&);
+
+ virtual ~DeviceOrientationInspectorAgent();
+
+ // Protocol methods.
+ virtual void setDeviceOrientationOverride(ErrorString*, double, double, double) OVERRIDE;
+ virtual void clearDeviceOrientationOverride(ErrorString*) OVERRIDE;
+
+ // Inspector Controller API.
+ virtual void clearFrontend() OVERRIDE;
+ virtual void restore() OVERRIDE;
+ virtual void didCommitLoadForMainFrame() OVERRIDE;
+
+private:
+ explicit DeviceOrientationInspectorAgent(Page&);
+ DeviceOrientationController& controller();
+ Page& m_page;
+};
+
+} // namespace WebCore
+
+
+#endif // !defined(DeviceOrientationInspectorAgent_h)