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

Side by Side Diff: Source/modules/wake_lock/NavigatorWakeLock.h

Issue 399313003: Initial implementation of API WakeLock. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Implementation of WakeLock API on JavaScript side. Created 6 years, 4 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
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/wake_lock/NavigatorWakeLock.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NavigatorWakeLock_h
6 #define NavigatorWakeLock_h
7
8 #include "platform/Supplementable.h"
9 #include "platform/heap/Handle.h"
10
11 namespace blink {
12
13 class Navigator;
14 class ScriptState;
15 class WakeLock;
16
17 class NavigatorWakeLock FINAL
18 : public NoBaseWillBeGarbageCollectedFinalized<NavigatorWakeLock>
19 , public WillBeHeapSupplement<Navigator> {
20 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorWakeLock);
21 public:
22 virtual ~NavigatorWakeLock();
23 static NavigatorWakeLock& from(Navigator&);
24
25 static WakeLock* wakeLock(ScriptState*, Navigator&);
26 WakeLock* wakeLock(ScriptState*);
27
28 void trace(Visitor*);
29
30 private:
31 NavigatorWakeLock();
32 static const char* supplementName();
33
34 RefPtrWillBeMember<WakeLock> m_wakeLock;
35 };
36
37 } // namespace blink
38
39 #endif // NavigatorWakeLock_h
OLDNEW
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/wake_lock/NavigatorWakeLock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698