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

Side by Side Diff: third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h

Issue 1846913009: HeapSupplements are now just Supplements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ScreenWakeLock_h 5 #ifndef ScreenWakeLock_h
6 #define ScreenWakeLock_h 6 #define ScreenWakeLock_h
7 7
8 #include "core/frame/LocalFrameLifecycleObserver.h" 8 #include "core/frame/LocalFrameLifecycleObserver.h"
9 #include "core/page/PageLifecycleObserver.h" 9 #include "core/page/PageLifecycleObserver.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "wtf/Noncopyable.h" 11 #include "wtf/Noncopyable.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class LocalFrame; 15 class LocalFrame;
16 class Screen; 16 class Screen;
17 class WebWakeLockClient; 17 class WebWakeLockClient;
18 18
19 class MODULES_EXPORT ScreenWakeLock final : public GarbageCollected<ScreenWakeLo ck>, public HeapSupplement<LocalFrame>, public PageLifecycleObserver, public Loc alFrameLifecycleObserver { 19 class MODULES_EXPORT ScreenWakeLock final : public GarbageCollected<ScreenWakeLo ck>, public Supplement<LocalFrame>, public PageLifecycleObserver, public LocalFr ameLifecycleObserver {
20 USING_GARBAGE_COLLECTED_MIXIN(ScreenWakeLock); 20 USING_GARBAGE_COLLECTED_MIXIN(ScreenWakeLock);
21 WTF_MAKE_NONCOPYABLE(ScreenWakeLock); 21 WTF_MAKE_NONCOPYABLE(ScreenWakeLock);
22 public: 22 public:
23 static bool keepAwake(Screen&); 23 static bool keepAwake(Screen&);
24 static void setKeepAwake(Screen&, bool); 24 static void setKeepAwake(Screen&, bool);
25 25
26 bool keepAwake() const { return m_keepAwake; } 26 bool keepAwake() const { return m_keepAwake; }
27 void setKeepAwake(bool); 27 void setKeepAwake(bool);
28 28
29 static const char* supplementName(); 29 static const char* supplementName();
(...skipping 15 matching lines...) Expand all
45 static ScreenWakeLock* fromScreen(Screen&); 45 static ScreenWakeLock* fromScreen(Screen&);
46 void notifyClient(); 46 void notifyClient();
47 47
48 WebWakeLockClient* m_client; 48 WebWakeLockClient* m_client;
49 bool m_keepAwake; 49 bool m_keepAwake;
50 }; 50 };
51 51
52 } // namespace blink 52 } // namespace blink
53 53
54 #endif // ScreenWakeLock_h 54 #endif // ScreenWakeLock_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRController.cpp ('k') | third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698