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

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

Issue 374623002: [screen-orientation] Update implementation to match recent spec changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 5 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 71bc9546996c620cf14674765044d75ad15e1e8e..7bbefe9ab30b7fac83c2052d65dfba009eea3f09 100644
--- a/Source/modules/screen_orientation/ScreenOrientationController.h
+++ b/Source/modules/screen_orientation/ScreenOrientationController.h
@@ -18,8 +18,12 @@ class WebScreenOrientationClient;
namespace WebCore {
class FrameView;
+class ScreenOrientation;
-class ScreenOrientationController FINAL : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientationController>, public WillBeHeapSupplement<LocalFrame>, 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:
@@ -27,14 +31,19 @@ public:
virtual void persistentHostHasBeenDestroyed() OVERRIDE;
- blink::WebScreenOrientationType orientation() const;
+ void setOrientation(ScreenOrientation*);
+ void notifyOrientationChanged();
+
+ void lock(blink::WebScreenOrientationLockType, blink::WebLockOrientationCallback*);
+ void unlock();
+
+ const LocalFrame& frame() const;
static void provideTo(LocalFrame&, blink::WebScreenOrientationClient*);
- static ScreenOrientationController& from(LocalFrame&);
+ static ScreenOrientationController* from(LocalFrame&);
static const char* supplementName();
- void lockOrientation(blink::WebScreenOrientationLockType, blink::WebLockOrientationCallback*);
- void unlockOrientation();
+ virtual void trace(Visitor*);
private:
explicit ScreenOrientationController(LocalFrame&, blink::WebScreenOrientationClient*);
@@ -43,7 +52,9 @@ private:
// Inherited from PageLifecycleObserver.
virtual void pageVisibilityChanged() OVERRIDE;
- blink::WebScreenOrientationType m_overrideOrientation;
+ void updateOrientation();
+
+ PersistentWillBeMember<ScreenOrientation> m_orientation;
blink::WebScreenOrientationClient* m_client;
LocalFrame& m_frame;
};

Powered by Google App Engine
This is Rietveld 408576698