Index: content/renderer/screen_orientation_dispatcher.h |
diff --git a/content/renderer/screen_orientation_dispatcher.h b/content/renderer/screen_orientation_dispatcher.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6a2954add4c07a50c7105ff911c852e203970aa1 |
--- /dev/null |
+++ b/content/renderer/screen_orientation_dispatcher.h |
@@ -0,0 +1,38 @@ |
+// 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 CONTENT_RENDERER_SCREEN_ORIENTATION_DISPATCHER_H_ |
+#define CONTENT_RENDERER_SCREEN_ORIENTATION_DISPATCHER_H_ |
+ |
+#include "base/macros.h" |
+#include "content/public/renderer/render_view_observer.h" |
+#include "third_party/WebKit/public/web/WebScreenOrientation.h" |
+#include "third_party/WebKit/public/web/WebScreenOrientationClient.h" |
+ |
+namespace blink { class WebScreenOrientationController; } |
+ |
+namespace content { |
+ |
+class RenderViewImpl; |
+ |
+class ScreenOrientationDispatcher : public RenderViewObserver, |
+ public blink::WebScreenOrientationClient { |
+ public: |
+ ScreenOrientationDispatcher(RenderViewImpl*); |
+ private: |
+ // RenderViewObserver |
+ virtual void OrientationChangeEvent(int orientation) OVERRIDE; |
+ |
+ // blink::WebScreenOrientationClient |
+ virtual bool lockOrientation(blink::WebScreenOrientations) OVERRIDE; |
+ virtual void unlockOrientation() OVERRIDE; |
+ virtual void setController(blink::WebScreenOrientationController*) OVERRIDE; |
+ |
+ |
+ blink::WebScreenOrientationController* controller_; |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_RENDERER_SCREEN_ORIENTATION_DISPATCHER_H_ |