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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 case blink::WebScreenOrientationUndefined: | 196 case blink::WebScreenOrientationUndefined: |
197 NOTREACHED(); | 197 NOTREACHED(); |
198 return blink::WebScreenOrientationLockDefault; | 198 return blink::WebScreenOrientationLockDefault; |
199 } | 199 } |
200 | 200 |
201 NOTREACHED(); | 201 NOTREACHED(); |
202 return blink::WebScreenOrientationLockDefault; | 202 return blink::WebScreenOrientationLockDefault; |
203 } | 203 } |
204 | 204 |
205 // static | 205 // static |
| 206 void ScreenOrientationProviderAndroid::StartAccurateListening() { |
| 207 Java_ScreenOrientationProvider_startAccurateListening( |
| 208 base::android::AttachCurrentThread()); |
| 209 } |
| 210 |
| 211 // static |
| 212 void ScreenOrientationProviderAndroid::StopAccurateListening() { |
| 213 Java_ScreenOrientationProvider_stopAccurateListening( |
| 214 base::android::AttachCurrentThread()); |
| 215 } |
| 216 |
| 217 // static |
206 ScreenOrientationProvider* ScreenOrientationProvider::Create( | 218 ScreenOrientationProvider* ScreenOrientationProvider::Create( |
207 ScreenOrientationDispatcherHost* dispatcher, | 219 ScreenOrientationDispatcherHost* dispatcher, |
208 WebContents* web_contents) { | 220 WebContents* web_contents) { |
209 return new ScreenOrientationProviderAndroid(dispatcher, web_contents); | 221 return new ScreenOrientationProviderAndroid(dispatcher, web_contents); |
210 } | 222 } |
211 | 223 |
212 } // namespace content | 224 } // namespace content |
OLD | NEW |