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

Unified Diff: content/renderer/screen_orientation/screen_orientation_dispatcher.h

Issue 164913004: Chromium plumbing for Screen Orientation API orientationchange events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated 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
Index: content/renderer/screen_orientation/screen_orientation_dispatcher.h
diff --git a/content/renderer/screen_orientation/screen_orientation_dispatcher.h b/content/renderer/screen_orientation/screen_orientation_dispatcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..72a76eca933b59baaf601818a072c62410aa64b5
--- /dev/null
+++ b/content/renderer/screen_orientation/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_process_observer.h"
+
+namespace blink {
+class WebScreenOrientationListener;
+}
+
+namespace content {
+
+class RenderThread;
+
+// ScreenOrientationDispatcher listens to message from the browser process and
+// dispatch the orientation change ones to the WebScreenOrientationListener.
+class ScreenOrientationDispatcher : public RenderProcessObserver {
+ public:
+ ScreenOrientationDispatcher(RenderThread*);
jochen (gone - plz use gerrit) 2014/02/20 16:11:04 explicit. also, needs virtual dtor
mlamouri (slow - plz ping) 2014/02/20 16:32:47 Done.
+
+ // RenderProcessObserver
+ virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ void setListener(blink::WebScreenOrientationListener*);
+
+ private:
+ void OnOrientationChange(int orientation);
+
+ blink::WebScreenOrientationListener* listener_;
+};
jochen (gone - plz use gerrit) 2014/02/20 16:11:04 disallow copy/assign
mlamouri (slow - plz ping) 2014/02/20 16:32:47 Done.
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_SCREEN_ORIENTATION_DISPATCHER_H_

Powered by Google App Engine
This is Rietveld 408576698