| 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_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ | 5 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ |
| 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ | 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class CONTENT_EXPORT ScreenOrientationProvider | 26 class CONTENT_EXPORT ScreenOrientationProvider |
| 27 : NON_EXPORTED_BASE(public device::mojom::ScreenOrientation), | 27 : NON_EXPORTED_BASE(public device::mojom::ScreenOrientation), |
| 28 public WebContentsObserver { | 28 public WebContentsObserver { |
| 29 public: | 29 public: |
| 30 ScreenOrientationProvider(WebContents* web_contents); | 30 ScreenOrientationProvider(WebContents* web_contents); |
| 31 | 31 |
| 32 ~ScreenOrientationProvider() override; | 32 ~ScreenOrientationProvider() override; |
| 33 | 33 |
| 34 // device::mojom::ScreenOrientation: | 34 // device::mojom::ScreenOrientation: |
| 35 void LockOrientation(blink::WebScreenOrientationLockType orientation, | 35 void LockOrientation(blink::WebScreenOrientationLockType orientation, |
| 36 const LockOrientationCallback& callback) override; | 36 LockOrientationCallback callback) override; |
| 37 void UnlockOrientation() override; | 37 void UnlockOrientation() override; |
| 38 | 38 |
| 39 // Inform about a screen orientation update. It is called to let the provider | 39 // Inform about a screen orientation update. It is called to let the provider |
| 40 // know if a lock has been resolved. | 40 // know if a lock has been resolved. |
| 41 void OnOrientationChange(); | 41 void OnOrientationChange(); |
| 42 | 42 |
| 43 // Provide a delegate which creates delegates for platform implementations. | 43 // Provide a delegate which creates delegates for platform implementations. |
| 44 // The delegate is not owned by ScreenOrientationProvider. | 44 // The delegate is not owned by ScreenOrientationProvider. |
| 45 static void SetDelegate(ScreenOrientationDelegate* delegate_); | 45 static void SetDelegate(ScreenOrientationDelegate* delegate_); |
| 46 | 46 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 76 LockOrientationCallback pending_callback_; | 76 LockOrientationCallback pending_callback_; |
| 77 | 77 |
| 78 WebContentsFrameBindingSet<device::mojom::ScreenOrientation> bindings_; | 78 WebContentsFrameBindingSet<device::mojom::ScreenOrientation> bindings_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider); | 80 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace content | 83 } // namespace content |
| 84 | 84 |
| 85 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ | 85 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ |
| OLD | NEW |