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

Unified Diff: third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h

Issue 2126733002: Make ScreenWakeLock ContextLifecycleObserver instead of LocalFrameLifecycleObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 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 | « no previous file | third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
diff --git a/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h b/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
index eeddc68fff488699114a84d39634d0d2af25e689..1e9e9ca77cddad15a585357e84a651c326730be8 100644
--- a/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
+++ b/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
@@ -5,7 +5,7 @@
#ifndef ScreenWakeLock_h
#define ScreenWakeLock_h
-#include "core/frame/LocalFrameLifecycleObserver.h"
+#include "core/dom/ContextLifecycleObserver.h"
#include "core/page/PageLifecycleObserver.h"
#include "modules/ModulesExport.h"
#include "public/platform/modules/wake_lock/wake_lock_service.mojom-blink.h"
@@ -17,7 +17,7 @@ class LocalFrame;
class Screen;
class ServiceRegistry;
-class MODULES_EXPORT ScreenWakeLock final : public GarbageCollectedFinalized<ScreenWakeLock>, public Supplement<LocalFrame>, public PageLifecycleObserver, public LocalFrameLifecycleObserver {
+class MODULES_EXPORT ScreenWakeLock final : public GarbageCollectedFinalized<ScreenWakeLock>, public Supplement<LocalFrame>, public ContextLifecycleObserver, public PageLifecycleObserver {
USING_GARBAGE_COLLECTED_MIXIN(ScreenWakeLock);
WTF_MAKE_NONCOPYABLE(ScreenWakeLock);
public:
@@ -26,21 +26,17 @@ public:
static const char* supplementName();
static ScreenWakeLock* from(LocalFrame*);
- static void provideTo(LocalFrame&, ServiceRegistry*);
~ScreenWakeLock() = default;
DECLARE_VIRTUAL_TRACE();
private:
- ScreenWakeLock(LocalFrame&, ServiceRegistry*);
+ explicit ScreenWakeLock(LocalFrame&);
// Inherited from PageLifecycleObserver.
void pageVisibilityChanged() override;
- void didCommitLoad(LocalFrame*) override;
-
- // Inherited from LocalFrameLifecycleObserver.
- void willDetachFrameHost() override;
+ void contextDestroyed() override;
bool keepAwake() const;
void setKeepAwake(bool);
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698