| 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 #ifndef CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 bool LockMatchesCurrentOrientation(blink::WebScreenOrientationLockType lock); | 65 bool LockMatchesCurrentOrientation(blink::WebScreenOrientationLockType lock); |
| 66 | 66 |
| 67 // Not owned, responsible for platform implementations. | 67 // Not owned, responsible for platform implementations. |
| 68 static ScreenOrientationDelegate* delegate_; | 68 static ScreenOrientationDelegate* delegate_; |
| 69 | 69 |
| 70 // Whether the ScreenOrientationProvider currently has a lock applied. | 70 // Whether the ScreenOrientationProvider currently has a lock applied. |
| 71 bool lock_applied_; | 71 bool lock_applied_; |
| 72 | 72 |
| 73 // Locks that require orientation changes are not completed until | 73 // Locks that require orientation changes are not completed until |
| 74 // OnOrientationChange. | 74 // OnOrientationChange. |
| 75 | |
| 76 base::Optional<blink::WebScreenOrientationLockType> pending_lock_orientation_; | 75 base::Optional<blink::WebScreenOrientationLockType> pending_lock_orientation_; |
| 77 | 76 |
| 78 LockOrientationCallback on_result_callback_; | 77 LockOrientationCallback on_result_callback_; |
| 79 | 78 |
| 80 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider); | 79 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider); |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 } // namespace content | 82 } // namespace content |
| 84 | 83 |
| 85 #endif // CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_ | 84 #endif // CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_ |
| OLD | NEW |