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

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

Issue 419643008: Make Screen Orientation use Platform Events in order to handle polling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@platform_events
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
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/screen_orientation/ScreenOrientationController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/screen_orientation/ScreenOrientationController.h
diff --git a/Source/modules/screen_orientation/ScreenOrientationController.h b/Source/modules/screen_orientation/ScreenOrientationController.h
index 8c22be07397760319684f790c17a7f15b4a91292..f3322662c2098982d8d6ff4a5e734cfbdbe4e218 100644
--- a/Source/modules/screen_orientation/ScreenOrientationController.h
+++ b/Source/modules/screen_orientation/ScreenOrientationController.h
@@ -5,7 +5,7 @@
#ifndef ScreenOrientationController_h
#define ScreenOrientationController_h
-#include "core/page/PageLifecycleObserver.h"
+#include "core/frame/PlatformEventController.h"
#include "platform/Supplementable.h"
#include "platform/Timer.h"
#include "public/platform/WebLockOrientationCallback.h"
@@ -24,7 +24,7 @@ class ScreenOrientation;
class ScreenOrientationController FINAL
: public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientationController>
, public WillBeHeapSupplement<LocalFrame>
- , public PageLifecycleObserver {
+ , public PlatformEventController {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController);
WTF_MAKE_NONCOPYABLE(ScreenOrientationController);
public:
@@ -50,9 +50,15 @@ private:
explicit ScreenOrientationController(LocalFrame&, blink::WebScreenOrientationClient*);
static blink::WebScreenOrientationType computeOrientation(FrameView*);
- // Inherited from PageLifecycleObserver.
+ // Inherited from PlatformEventController.
+ virtual void didUpdateData() OVERRIDE;
+ virtual void registerWithDispatcher() OVERRIDE;
+ virtual void unregisterWithDispatcher() OVERRIDE;
+ virtual bool hasLastData() OVERRIDE;
virtual void pageVisibilityChanged() OVERRIDE;
+ void notifyDispatcher();
+
void updateOrientation();
void dispatchEventTimerFired(Timer<ScreenOrientationController>*);
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/screen_orientation/ScreenOrientationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698