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

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

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 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_ANDROID_H _ 5 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_ANDROID_H _
6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_ANDROID_H _ 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_ANDROID_H _
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/browser/screen_orientation/screen_orientation_provider.h" 10 #include "content/browser/screen_orientation/screen_orientation_provider.h"
(...skipping 14 matching lines...) Expand all
25 25
26 // ScreenOrientationProvider 26 // ScreenOrientationProvider
27 virtual void LockOrientation(int request_id, 27 virtual void LockOrientation(int request_id,
28 blink::WebScreenOrientationLockType) OVERRIDE; 28 blink::WebScreenOrientationLockType) OVERRIDE;
29 virtual void UnlockOrientation() OVERRIDE; 29 virtual void UnlockOrientation() OVERRIDE;
30 virtual void OnOrientationChange() OVERRIDE; 30 virtual void OnOrientationChange() OVERRIDE;
31 31
32 // WebContentsObserver 32 // WebContentsObserver
33 virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) OVERRIDE; 33 virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) OVERRIDE;
34 34
35 static void ToggleAccurateMode();
jam 2014/07/16 21:29:14 nit: add comment
mlamouri (slow - plz ping) 2014/07/17 09:44:16 Done.
36
35 private: 37 private:
36 WebContentsImpl* web_contents_impl(); 38 WebContentsImpl* web_contents_impl();
37 39
38 // Whether the passed |lock| matches the current orientation. In other words, 40 // Whether the passed |lock| matches the current orientation. In other words,
39 // whether the orientation will need to change to match the |lock|. 41 // whether the orientation will need to change to match the |lock|.
40 bool LockMatchesCurrentOrientation(blink::WebScreenOrientationLockType lock); 42 bool LockMatchesCurrentOrientation(blink::WebScreenOrientationLockType lock);
41 43
42 // Returns the lock type that should be associated with 'natural' lock. 44 // Returns the lock type that should be associated with 'natural' lock.
43 // Returns WebScreenOrientationLockDefault if the natural lock type can't be 45 // Returns WebScreenOrientationLockDefault if the natural lock type can't be
44 // found. 46 // found.
(...skipping 16 matching lines...) Expand all
61 blink::WebScreenOrientationLockType lock; 63 blink::WebScreenOrientationLockType lock;
62 }; 64 };
63 LockInformation* pending_lock_; 65 LockInformation* pending_lock_;
64 66
65 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProviderAndroid); 67 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProviderAndroid);
66 }; 68 };
67 69
68 } // namespace content 70 } // namespace content
69 71
70 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_ANDROID _H_ 72 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_ANDROID _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698