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

Side by Side Diff: content/public/browser/screen_orientation_provider.h

Issue 508603003: Export ScreenOrientationProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « content/public/browser/screen_orientation_dispatcher_host.h ('k') | no next file » | 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_SCREEN_ORIENTATION_PROVIDER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_
6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ 6 #define CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" 9 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 class ScreenOrientationDispatcherHost; 13 class ScreenOrientationDispatcherHost;
14 class WebContents; 14 class WebContents;
15 15
16 // Interface that needs to be implemented by any backend that wants to handle 16 // Interface that needs to be implemented by any backend that wants to handle
17 // screen orientation lock/unlock. 17 // screen orientation lock/unlock.
18 class ScreenOrientationProvider { 18 class ScreenOrientationProvider {
mlamouri (slow - plz ping) 2014/09/04 21:39:17 I just realize that this is probably missing CONTE
jonross 2014/09/05 13:39:07 Done.
19 public: 19 public:
20 // Lock the screen orientation to |orientations|. 20 // Lock the screen orientation to |orientations|.
21 virtual void LockOrientation( 21 virtual void LockOrientation(
22 int request_id, 22 int request_id,
23 blink::WebScreenOrientationLockType orientations) = 0; 23 blink::WebScreenOrientationLockType orientations) = 0;
24 24
25 // Unlock the screen orientation. 25 // Unlock the screen orientation.
26 virtual void UnlockOrientation() = 0; 26 virtual void UnlockOrientation() = 0;
27 27
28 // Inform about a screen orientation update. It is called to let the provider 28 // Inform about a screen orientation update. It is called to let the provider
29 // know if a lock has been resolved. 29 // know if a lock has been resolved.
30 virtual void OnOrientationChange() = 0; 30 virtual void OnOrientationChange() = 0;
31 31
32 virtual ~ScreenOrientationProvider() {} 32 virtual ~ScreenOrientationProvider() {}
33 33
34 protected: 34 protected:
35 friend class ScreenOrientationDispatcherHost; 35 friend class ScreenOrientationDispatcherHostImpl;
36 36
37 static ScreenOrientationProvider* Create( 37 static ScreenOrientationProvider* Create(
38 ScreenOrientationDispatcherHost* dispatcher_host, 38 ScreenOrientationDispatcherHost* dispatcher_host,
39 WebContents* web_contents); 39 WebContents* web_contents);
40 40
41 ScreenOrientationProvider() {} 41 ScreenOrientationProvider() {}
42 42
43 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider); 43 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider);
44 }; 44 };
45 45
46 #if !defined(OS_ANDROID) 46 #if !defined(OS_ANDROID)
47 // static 47 // static
48 ScreenOrientationProvider* ScreenOrientationProvider::Create( 48 ScreenOrientationProvider* ScreenOrientationProvider::Create(
49 ScreenOrientationDispatcherHost* dispatcher_host, 49 ScreenOrientationDispatcherHost* dispatcher_host,
50 WebContents* web_contents) { 50 WebContents* web_contents) {
51 return NULL; 51 return NULL;
52 } 52 }
53 #endif // !defined(OS_ANDROID) 53 #endif // !defined(OS_ANDROID)
54 54
55 } // namespace content 55 } // namespace content
56 56
57 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ 57 #endif // CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « content/public/browser/screen_orientation_dispatcher_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698