Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(726)

Unified Diff: content/renderer/screen_orientation_dispatcher.h

Issue 150153004: [WIP] Add Chromium-side support for the Screen Orientation API (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Updated by review comments. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/screen_orientation_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/screen_orientation_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698