| 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 18 matching lines...) Expand all Loading... |
| 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 const LockOrientationCallback& callback) override; |
| 37 void UnlockOrientation() override; | 37 void UnlockOrientation() override; |
| 38 | 38 |
| 39 #if defined(OS_ANDROID) |
| 39 // Inform about a screen orientation update. It is called to let the provider | 40 // Inform about a screen orientation update. It is called to let the provider |
| 40 // know if a lock has been resolved. | 41 // know if a lock has been resolved. |
| 41 void OnOrientationChange(); | 42 void OnOrientationChange(); |
| 43 #endif |
| 42 | 44 |
| 43 // Provide a delegate which creates delegates for platform implementations. | 45 // Provide a delegate which creates delegates for platform implementations. |
| 44 // The delegate is not owned by ScreenOrientationProvider. | 46 // The delegate is not owned by ScreenOrientationProvider. |
| 45 static void SetDelegate(ScreenOrientationDelegate* delegate_); | 47 static void SetDelegate(ScreenOrientationDelegate* delegate_); |
| 46 | 48 |
| 47 // WebContentsObserver | 49 // WebContentsObserver |
| 48 void DidToggleFullscreenModeForTab(bool entered_fullscreen, | 50 void DidToggleFullscreenModeForTab(bool entered_fullscreen, |
| 49 bool will_cause_resize) override; | 51 bool will_cause_resize) override; |
| 50 void DidFinishNavigation(NavigationHandle* navigation_handle) override; | 52 void DidFinishNavigation(NavigationHandle* navigation_handle) override; |
| 51 | 53 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 76 LockOrientationCallback pending_callback_; | 78 LockOrientationCallback pending_callback_; |
| 77 | 79 |
| 78 WebContentsFrameBindingSet<device::mojom::ScreenOrientation> bindings_; | 80 WebContentsFrameBindingSet<device::mojom::ScreenOrientation> bindings_; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider); | 82 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace content | 85 } // namespace content |
| 84 | 86 |
| 85 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ | 87 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ |
| OLD | NEW |