Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Unified Diff: Source/modules/screen_orientation/ScreenOrientationController.h

Issue 315693002: Use WebViewClient instead of BlinkPlatform for screen lock. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698