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

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: call ScreenOrientationListener on UI thread Created 6 years, 4 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « content/browser/screen_orientation/screen_orientation_provider_android.h ('k') | content/common/screen_orientation_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698