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

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

Issue 319633007: Move WebScreenOrientationClient to WebFrameClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: m_client null check Created 6 years, 6 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 0e5e4b7741fc73e835d8bda504a3679719e6c707..1fbd0b82d945f39c8bdd89f812fa6818da57d65e 100644
--- a/Source/modules/screen_orientation/ScreenOrientationController.h
+++ b/Source/modules/screen_orientation/ScreenOrientationController.h
@@ -5,7 +5,6 @@
#ifndef ScreenOrientationController_h
#define ScreenOrientationController_h
-#include "core/page/Page.h"
#include "core/page/PageLifecycleObserver.h"
#include "platform/Supplementable.h"
#include "public/platform/WebLockOrientationCallback.h"
@@ -20,22 +19,23 @@ namespace WebCore {
class FrameView;
-class ScreenOrientationController FINAL : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientationController>, public WillBeHeapSupplement<Page>, public PageLifecycleObserver {
+class ScreenOrientationController FINAL : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientationController>, public WillBeHeapSupplement<LocalFrame>, public PageLifecycleObserver {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController);
+ WTF_MAKE_NONCOPYABLE(ScreenOrientationController);
public:
virtual ~ScreenOrientationController();
blink::WebScreenOrientationType orientation() const;
- static void provideTo(Page&, blink::WebScreenOrientationClient*);
- static ScreenOrientationController& from(Page&);
+ static void provideTo(LocalFrame&, blink::WebScreenOrientationClient*);
+ static ScreenOrientationController& from(LocalFrame&);
static const char* supplementName();
void lockOrientation(blink::WebScreenOrientationLockType, blink::WebLockOrientationCallback*);
void unlockOrientation();
private:
- explicit ScreenOrientationController(Page&, blink::WebScreenOrientationClient*);
+ explicit ScreenOrientationController(LocalFrame&, blink::WebScreenOrientationClient*);
static blink::WebScreenOrientationType computeOrientation(FrameView*);
// Inherited from PageLifecycleObserver.
@@ -43,6 +43,7 @@ private:
blink::WebScreenOrientationType m_overrideOrientation;
blink::WebScreenOrientationClient* m_client;
+ LocalFrame& m_frame;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698