| Index: content/public/browser/screen_orientation_provider.h
|
| diff --git a/content/public/browser/screen_orientation_provider.h b/content/public/browser/screen_orientation_provider.h
|
| index c94fbe7239219326d1810b7cc4bc8d095bfd1fda..385ccf0c183f136471d51967f2f70570cd9c0424 100644
|
| --- a/content/public/browser/screen_orientation_provider.h
|
| +++ b/content/public/browser/screen_orientation_provider.h
|
| @@ -5,23 +5,24 @@
|
| #ifndef CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_
|
| #define CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_
|
|
|
| +#include "base/callback.h"
|
| #include "base/macros.h"
|
| #include "content/common/content_export.h"
|
| -#include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
|
| +#include "content/public/common/screen_orientation.mojom.h"
|
|
|
| namespace content {
|
|
|
| -class ScreenOrientationDispatcherHost;
|
| class WebContents;
|
|
|
| +typedef base::Callback<void(ScreenOrientationLockResult)>
|
| + ScreenOrientationLockCallback;
|
| +
|
| // Interface that needs to be implemented by any backend that wants to handle
|
| // screen orientation lock/unlock.
|
| class CONTENT_EXPORT ScreenOrientationProvider {
|
| public:
|
| - // Lock the screen orientation to |orientations|.
|
| - virtual void LockOrientation(
|
| - int request_id,
|
| - blink::WebScreenOrientationLockType orientations) = 0;
|
| + // Lock the screen orientation to |lock_type|.
|
| + virtual void LockOrientation(ScreenOrientationLockType lock_type) = 0;
|
|
|
| // Unlock the screen orientation.
|
| virtual void UnlockOrientation() = 0;
|
| @@ -33,12 +34,13 @@ class CONTENT_EXPORT ScreenOrientationProvider {
|
| virtual ~ScreenOrientationProvider() {}
|
|
|
| protected:
|
| - friend class ScreenOrientationDispatcherHostImpl;
|
| + friend class ScreenOrientationServiceImpl;
|
|
|
| static ScreenOrientationProvider* Create(
|
| - ScreenOrientationDispatcherHost* dispatcher_host,
|
| + // The callback that should be invoked when a lock request receives a
|
| + // result.
|
| + const ScreenOrientationLockCallback& on_result_callback,
|
| WebContents* web_contents);
|
| -
|
| ScreenOrientationProvider() {}
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider);
|
| @@ -47,11 +49,11 @@ class CONTENT_EXPORT ScreenOrientationProvider {
|
| #if !defined(OS_ANDROID)
|
| // static
|
| ScreenOrientationProvider* ScreenOrientationProvider::Create(
|
| - ScreenOrientationDispatcherHost* dispatcher_host,
|
| + const ScreenOrientationLockCallback& on_result_callback,
|
| WebContents* web_contents) {
|
| return NULL;
|
| }
|
| -#endif // !defined(OS_ANDROID)
|
| +#endif // !defined(OS_ANDROID)
|
|
|
| } // namespace content
|
|
|
|
|