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

Side by Side Diff: content/browser/screen_orientation/screen_orientation_provider_android.cc

Issue 398013002: Poll for Display rotation on Android 4.0 and 4.1 when needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 #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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698