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

Side by Side Diff: content/browser/screen_orientation/screen_orientation_dispatcher_host.h

Issue 177793003: Chromium plumbing for Screen Orientation API lock/unlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromium_plumbing_screen_orientation
Patch Set: fix compilation issue Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/screen_orientation/screen_orientation_dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CONTENT_BROWSER_SCREEN_ORIENTATION_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_DISPATCHER_HOST_H_
7 7
8 #include "content/public/browser/browser_message_filter.h" 8 #include "content/public/browser/browser_message_filter.h"
9 #include "third_party/WebKit/public/platform/WebScreenOrientation.h" 9 #include "third_party/WebKit/public/platform/WebScreenOrientation.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 // ScreenOrientationDispatcherHost 13 class ScreenOrientationProvider;
14 class ScreenOrientationDispatcherHost : public BrowserMessageFilter { 14
15 // ScreenOrientationDispatcherHost is a browser filter for Screen Orientation
16 // messages and also helps dispatching messages about orientation changes to the
17 // renderers.
18 class CONTENT_EXPORT ScreenOrientationDispatcherHost
19 : public BrowserMessageFilter {
15 public: 20 public:
16 ScreenOrientationDispatcherHost(); 21 ScreenOrientationDispatcherHost();
17 22
18 // BrowserMessageFilter 23 // BrowserMessageFilter
19 virtual bool OnMessageReceived(const IPC::Message&, bool*) OVERRIDE; 24 virtual bool OnMessageReceived(const IPC::Message&, bool*) OVERRIDE;
20 25
21 void OnOrientationChange(blink::WebScreenOrientation orientation); 26 void OnOrientationChange(blink::WebScreenOrientation orientation);
22 27
23 private: 28 void SetProviderForTests(ScreenOrientationProvider* provider);
24 virtual ~ScreenOrientationDispatcherHost() {} 29
30 private:
31 virtual ~ScreenOrientationDispatcherHost();
32
33 void OnLockRequest(blink::WebScreenOrientations orientations);
34 void OnUnlockRequest();
35
36 static ScreenOrientationProvider* CreateProvider();
37
38 scoped_ptr<ScreenOrientationProvider> provider_;
25 39
26 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcherHost); 40 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcherHost);
27 }; 41 };
28 42
29 } // namespace content 43 } // namespace content
30 44
31 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_DISPATCHER_HOST_H_ 45 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/screen_orientation/screen_orientation_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698