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_provider_android
.h" | 5 #include "content/browser/screen_orientation/screen_orientation_provider_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 "content/browser/screen_orientation/screen_orientation_dispatcher_host.
h" | 8 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host.
h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 case blink::WebScreenOrientationUndefined: | 198 case blink::WebScreenOrientationUndefined: |
199 NOTREACHED(); | 199 NOTREACHED(); |
200 return blink::WebScreenOrientationLockDefault; | 200 return blink::WebScreenOrientationLockDefault; |
201 } | 201 } |
202 | 202 |
203 NOTREACHED(); | 203 NOTREACHED(); |
204 return blink::WebScreenOrientationLockDefault; | 204 return blink::WebScreenOrientationLockDefault; |
205 } | 205 } |
206 | 206 |
207 // static | 207 // static |
| 208 void ScreenOrientationProviderAndroid::ToggleAccurateMode() { |
| 209 Java_ScreenOrientationProvider_toggleAccurateMode( |
| 210 base::android::AttachCurrentThread()); |
| 211 } |
| 212 |
| 213 // static |
208 ScreenOrientationProvider* ScreenOrientationProvider::Create( | 214 ScreenOrientationProvider* ScreenOrientationProvider::Create( |
209 ScreenOrientationDispatcherHost* dispatcher, | 215 ScreenOrientationDispatcherHost* dispatcher, |
210 WebContents* web_contents) { | 216 WebContents* web_contents) { |
211 return new ScreenOrientationProviderAndroid(dispatcher, web_contents); | 217 return new ScreenOrientationProviderAndroid(dispatcher, web_contents); |
212 } | 218 } |
213 | 219 |
214 } // namespace content | 220 } // namespace content |
OLD | NEW |