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

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

Issue 2745443002: [Device Service] Port ScreenOrientationListener into Device Service. (Closed)
Patch Set: Add DEPS Created 3 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
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_DELEGATE_ANDROID_H _ 5 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_ANDROID_H _
6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_ANDROID_H _ 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_ANDROID_H _
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/public/browser/screen_orientation_delegate.h" 11 #include "content/public/browser/screen_orientation_delegate.h"
12 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationLockType.h" 12 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationLockType.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 class WebContents; 16 class WebContents;
17 17
18 // Android implementation of ScreenOrientationDelegate. The functionality of 18 // Android implementation of ScreenOrientationDelegate. The functionality of
19 // ScreenOrientationProvider is always supported. 19 // ScreenOrientationProvider is always supported.
20 class ScreenOrientationDelegateAndroid : public ScreenOrientationDelegate { 20 class ScreenOrientationDelegateAndroid : public ScreenOrientationDelegate {
21 public: 21 public:
22 ScreenOrientationDelegateAndroid(); 22 ScreenOrientationDelegateAndroid();
23 ~ScreenOrientationDelegateAndroid() override; 23 ~ScreenOrientationDelegateAndroid() override;
24 24
25 // Ask the ScreenOrientationListener (Java) to start accurately listening to
26 // the screen orientation. It keep track of the number of start request if it
27 // is already running an accurate listening.
28 static void StartAccurateListening();
29
30 // Ask the ScreenOrientationListener (Java) to stop accurately listening to
31 // the screen orientation. It will actually stop only if the number of stop
32 // requests matches the number of start requests.
33 static void StopAccurateListening();
34
35 // ScreenOrientationDelegate: 25 // ScreenOrientationDelegate:
36 bool FullScreenRequired(WebContents* web_contents) override; 26 bool FullScreenRequired(WebContents* web_contents) override;
37 void Lock(WebContents* web_contents, 27 void Lock(WebContents* web_contents,
38 blink::WebScreenOrientationLockType lock_orientation) override; 28 blink::WebScreenOrientationLockType lock_orientation) override;
39 bool ScreenOrientationProviderSupported() override; 29 bool ScreenOrientationProviderSupported() override;
40 void Unlock(WebContents* web_contents) override; 30 void Unlock(WebContents* web_contents) override;
41 31
42 private: 32 private:
43 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDelegateAndroid); 33 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDelegateAndroid);
44 }; 34 };
45 35
46 } // namespace content 36 } // namespace content
47 37
48 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_ANDROI D_H_ 38 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_ANDROI D_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698