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

Unified Diff: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.h

Issue 2688383002: [ScreenOrientation] Merge mojo interface ScreenOrientationListener into ScreenOrientation
Patch Set: Address comments from mlamouri@ Created 3 years, 10 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: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.h
diff --git a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.h b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.h
index dadb7f5da61ef47c061c04d9de658e219791cdec..14a4ec3800c8e347785a1115d9df6dcd9866ec81 100644
--- a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.h
+++ b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.h
@@ -6,13 +6,12 @@
#define ScreenOrientationControllerImpl_h
#include "core/dom/Document.h"
-#include "core/frame/PlatformEventController.h"
#include "core/frame/ScreenOrientationController.h"
+#include "core/page/PageVisibilityObserver.h"
#include "modules/ModulesExport.h"
#include "public/platform/modules/screen_orientation/WebLockOrientationCallback.h"
#include "public/platform/modules/screen_orientation/WebScreenOrientationLockType.h"
#include "public/platform/modules/screen_orientation/WebScreenOrientationType.h"
-#include <memory>
namespace blink {
@@ -22,7 +21,7 @@ class WebScreenOrientationClient;
class MODULES_EXPORT ScreenOrientationControllerImpl final
: public ScreenOrientationController,
public ContextLifecycleObserver,
- public PlatformEventController {
+ public PageVisibilityObserver {
USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationControllerImpl);
WTF_MAKE_NONCOPYABLE(ScreenOrientationControllerImpl);
@@ -48,17 +47,12 @@ class MODULES_EXPORT ScreenOrientationControllerImpl final
static WebScreenOrientationType computeOrientation(const IntRect&, uint16_t);
- // Inherited from PlatformEventController.
- void didUpdateData() override;
- void registerWithDispatcher() override;
- void unregisterWithDispatcher() override;
- bool hasLastData() override;
-
- // Inherited from ContextLifecycleObserver and PageVisibilityObserver.
+ // Inherited from ContextLifecycleObserver.
void contextDestroyed(ExecutionContext*) override;
+ // Inherited from PageVisibilityObserver.
void pageVisibilityChanged() override;
- void notifyDispatcher();
+ void notifyAccurateListen();
void updateOrientation();
@@ -72,6 +66,7 @@ class MODULES_EXPORT ScreenOrientationControllerImpl final
WebScreenOrientationClient* m_client;
TaskRunnerTimer<ScreenOrientationControllerImpl> m_dispatchEventTimer;
bool m_activeLock = false;
+ bool m_startedAccurateListen = false;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698