OLD | NEW |
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 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" | 5 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" |
6 | 6 |
7 #include "content/browser/android/content_view_core_impl.h" | 7 #include "content/browser/android/content_view_core_impl.h" |
8 #include "jni/ScreenOrientationProvider_jni.h" | 8 #include "jni/ScreenOrientationProvider_jni.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 24 matching lines...) Expand all Loading... |
35 bool ScreenOrientationDelegateAndroid::FullScreenRequired( | 35 bool ScreenOrientationDelegateAndroid::FullScreenRequired( |
36 WebContents* web_contents) { | 36 WebContents* web_contents) { |
37 ContentViewCoreImpl* cvc = | 37 ContentViewCoreImpl* cvc = |
38 ContentViewCoreImpl::FromWebContents(web_contents); | 38 ContentViewCoreImpl::FromWebContents(web_contents); |
39 bool fullscreen_required = cvc ? cvc->IsFullscreenRequiredForOrientationLock() | 39 bool fullscreen_required = cvc ? cvc->IsFullscreenRequiredForOrientationLock() |
40 : true; | 40 : true; |
41 return fullscreen_required; | 41 return fullscreen_required; |
42 } | 42 } |
43 | 43 |
44 void ScreenOrientationDelegateAndroid::Lock( | 44 void ScreenOrientationDelegateAndroid::Lock( |
| 45 WebContents* web_contents, |
45 blink::WebScreenOrientationLockType lock_orientation) { | 46 blink::WebScreenOrientationLockType lock_orientation) { |
46 Java_ScreenOrientationProvider_lockOrientation( | 47 Java_ScreenOrientationProvider_lockOrientation( |
47 base::android::AttachCurrentThread(), lock_orientation); | 48 base::android::AttachCurrentThread(), lock_orientation); |
48 } | 49 } |
49 | 50 |
50 bool ScreenOrientationDelegateAndroid::ScreenOrientationProviderSupported() { | 51 bool ScreenOrientationDelegateAndroid::ScreenOrientationProviderSupported() { |
51 // Always supported on Android | 52 // Always supported on Android |
52 return true; | 53 return true; |
53 } | 54 } |
54 | 55 |
55 void ScreenOrientationDelegateAndroid::Unlock() { | 56 void ScreenOrientationDelegateAndroid::Unlock(WebContents* web_contents) { |
56 Java_ScreenOrientationProvider_unlockOrientation( | 57 Java_ScreenOrientationProvider_unlockOrientation( |
57 base::android::AttachCurrentThread()); | 58 base::android::AttachCurrentThread()); |
58 } | 59 } |
59 | 60 |
60 } // namespace content | 61 } // namespace content |
OLD | NEW |