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

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

Issue 2389743002: Content Modularization Project: Move Wake Lock to //device (Closed)
Patch Set: Eliminate frame reference Created 4 years, 2 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/dom/ContextLifecycleObserver.h" 8 #include "core/dom/ContextLifecycleObserver.h"
9 #include "core/page/PageVisibilityObserver.h" 9 #include "core/page/PageVisibilityObserver.h"
10 #include "device/wake_lock/public/interfaces/wake_lock_service.mojom-blink.h"
10 #include "modules/ModulesExport.h" 11 #include "modules/ModulesExport.h"
11 #include "public/platform/modules/wake_lock/wake_lock_service.mojom-blink.h"
12 #include "wtf/Noncopyable.h" 12 #include "wtf/Noncopyable.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class LocalFrame; 16 class LocalFrame;
17 class Screen; 17 class Screen;
18 18
19 class MODULES_EXPORT ScreenWakeLock final 19 class MODULES_EXPORT ScreenWakeLock final
20 : public GarbageCollectedFinalized<ScreenWakeLock>, 20 : public GarbageCollectedFinalized<ScreenWakeLock>,
21 public Supplement<LocalFrame>, 21 public Supplement<LocalFrame>,
(...skipping 19 matching lines...) Expand all
41 // Inherited from PageVisibilityObserver. 41 // Inherited from PageVisibilityObserver.
42 void pageVisibilityChanged() override; 42 void pageVisibilityChanged() override;
43 void contextDestroyed() override; 43 void contextDestroyed() override;
44 44
45 bool keepAwake() const; 45 bool keepAwake() const;
46 void setKeepAwake(bool); 46 void setKeepAwake(bool);
47 47
48 static ScreenWakeLock* fromScreen(Screen&); 48 static ScreenWakeLock* fromScreen(Screen&);
49 void notifyService(); 49 void notifyService();
50 50
51 mojom::blink::WakeLockServicePtr m_service; 51 device::mojom::blink::WakeLockServicePtr m_service;
52 bool m_keepAwake; 52 bool m_keepAwake;
53 }; 53 };
54 54
55 } // namespace blink 55 } // namespace blink
56 56
57 #endif // ScreenWakeLock_h 57 #endif // ScreenWakeLock_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/wake_lock/DEPS ('k') | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698