| Index: content/browser/screen_orientation/screen_orientation_provider.h
|
| diff --git a/content/browser/screen_orientation/screen_orientation_provider.h b/content/browser/screen_orientation/screen_orientation_provider.h
|
| index a94fca9ba8ccaa0f416b7bd7ef987bfe578b8f1c..0c709fd921378f3ab653748d51682b3c0827d185 100644
|
| --- a/content/browser/screen_orientation/screen_orientation_provider.h
|
| +++ b/content/browser/screen_orientation/screen_orientation_provider.h
|
| @@ -10,14 +10,15 @@
|
| #include "base/macros.h"
|
| #include "base/optional.h"
|
| #include "content/common/content_export.h"
|
| -#include "content/public/browser/web_contents_binding_set.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "device/screen_orientation/public/interfaces/screen_orientation.mojom.h"
|
| #include "device/screen_orientation/public/interfaces/screen_orientation_lock_types.mojom.h"
|
| +#include "mojo/public/cpp/bindings/binding_set.h"
|
| #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationLockType.h"
|
|
|
| namespace content {
|
|
|
| +class RenderFrameHost;
|
| class ScreenOrientationDelegate;
|
| class WebContents;
|
|
|
| @@ -31,6 +32,13 @@ class CONTENT_EXPORT ScreenOrientationProvider
|
|
|
| ~ScreenOrientationProvider() override;
|
|
|
| + // Provide a delegate which creates delegates for platform implementations.
|
| + // The delegate is not owned by ScreenOrientationProvider.
|
| + static void SetDelegate(ScreenOrientationDelegate* delegate_);
|
| +
|
| + static void BindRequest(RenderFrameHost* render_frame_host,
|
| + device::mojom::ScreenOrientationRequest request);
|
| +
|
| // device::mojom::ScreenOrientation:
|
| void LockOrientation(blink::WebScreenOrientationLockType orientation,
|
| const LockOrientationCallback& callback) override;
|
| @@ -42,16 +50,14 @@ class CONTENT_EXPORT ScreenOrientationProvider
|
| // know if a lock has been resolved.
|
| void OnOrientationChange();
|
|
|
| - // Provide a delegate which creates delegates for platform implementations.
|
| - // The delegate is not owned by ScreenOrientationProvider.
|
| - static void SetDelegate(ScreenOrientationDelegate* delegate_);
|
| -
|
| // WebContentsObserver
|
| void DidToggleFullscreenModeForTab(bool entered_fullscreen,
|
| bool will_cause_resize) override;
|
| void DidFinishNavigation(NavigationHandle* navigation_handle) override;
|
|
|
| private:
|
| + void AddBinding(device::mojom::ScreenOrientationRequest request);
|
| +
|
| // Calls on |on_result_callback_| with |result|, followed by resetting
|
| // |on_result_callback_| and |pending_lock_orientation_|.
|
| void NotifyLockResult(device::mojom::ScreenOrientationLockResult result);
|
| @@ -81,7 +87,7 @@ class CONTENT_EXPORT ScreenOrientationProvider
|
|
|
| LockOrientationCallback pending_callback_;
|
|
|
| - WebContentsFrameBindingSet<device::mojom::ScreenOrientation> bindings_;
|
| + mojo::BindingSet<device::mojom::ScreenOrientation> bindings_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider);
|
| };
|
|
|