| Index: Source/modules/screen_orientation/ScreenOrientationController.h
|
| diff --git a/Source/modules/screen_orientation/ScreenOrientationController.h b/Source/modules/screen_orientation/ScreenOrientationController.h
|
| index 6fb580022087004c5aa0ceb2b0eb1a6f2446fb1a..0e5e4b7741fc73e835d8bda504a3679719e6c707 100644
|
| --- a/Source/modules/screen_orientation/ScreenOrientationController.h
|
| +++ b/Source/modules/screen_orientation/ScreenOrientationController.h
|
| @@ -5,34 +5,44 @@
|
| #ifndef ScreenOrientationController_h
|
| #define ScreenOrientationController_h
|
|
|
| -#include "core/dom/DocumentSupplementable.h"
|
| +#include "core/page/Page.h"
|
| #include "core/page/PageLifecycleObserver.h"
|
| +#include "platform/Supplementable.h"
|
| +#include "public/platform/WebLockOrientationCallback.h"
|
| +#include "public/platform/WebScreenOrientationLockType.h"
|
| #include "public/platform/WebScreenOrientationType.h"
|
|
|
| +namespace blink {
|
| +class WebScreenOrientationClient;
|
| +}
|
| +
|
| namespace WebCore {
|
|
|
| class FrameView;
|
|
|
| -class ScreenOrientationController FINAL : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientationController>, public DocumentSupplement, public PageLifecycleObserver {
|
| +class ScreenOrientationController FINAL : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientationController>, public WillBeHeapSupplement<Page>, public PageLifecycleObserver {
|
| WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController);
|
| public:
|
| virtual ~ScreenOrientationController();
|
|
|
| blink::WebScreenOrientationType orientation() const;
|
|
|
| - // DocumentSupplement API.
|
| - static ScreenOrientationController& from(Document&);
|
| + static void provideTo(Page&, blink::WebScreenOrientationClient*);
|
| + static ScreenOrientationController& from(Page&);
|
| static const char* supplementName();
|
|
|
| + void lockOrientation(blink::WebScreenOrientationLockType, blink::WebLockOrientationCallback*);
|
| + void unlockOrientation();
|
| +
|
| private:
|
| - explicit ScreenOrientationController(Document&);
|
| + explicit ScreenOrientationController(Page&, blink::WebScreenOrientationClient*);
|
| static blink::WebScreenOrientationType computeOrientation(FrameView*);
|
|
|
| // Inherited from PageLifecycleObserver.
|
| virtual void pageVisibilityChanged() OVERRIDE;
|
|
|
| - Document& m_document;
|
| blink::WebScreenOrientationType m_overrideOrientation;
|
| + blink::WebScreenOrientationClient* m_client;
|
| };
|
|
|
| } // namespace WebCore
|
|
|