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

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
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 "core/frame/DOMWindowProperty.h"
9 #include "platform/Supplementable.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class LocalFrame;
15 class Navigator;
16 class WakeLock;
17
18 class NavigatorWakeLock FINAL
19 : public NoBaseWillBeGarbageCollectedFinalized<NavigatorWakeLock>
20 , public WillBeHeapSupplement<Navigator>
21 , public DOMWindowProperty {
mlamouri (slow - plz ping) 2014/08/18 12:15:52 I think you should be able to not depend on DOMWin
redchenko 2014/08/19 16:42:20 Done.
22 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorWakeLock);
23
mlamouri (slow - plz ping) 2014/08/18 12:15:52 nit: remove this empty line.
redchenko 2014/08/19 16:42:20 Done.
24 public:
25 virtual ~NavigatorWakeLock();
26 static NavigatorWakeLock& from(Navigator&);
27
28 static WakeLock* wakeLock(Navigator&);
29 WakeLock* wakeLock() const;
30
31 void trace(Visitor*);
32
33 private:
34 NavigatorWakeLock(LocalFrame*);
mlamouri (slow - plz ping) 2014/08/18 12:15:52 I think this should be NavigatorWakeLock(). But if
redchenko 2014/08/19 16:42:20 Done.
35 static const char* supplementName();
36
37 mutable RefPtrWillBeMember<WakeLock> m_wakeLock;
mlamouri (slow - plz ping) 2014/08/18 12:15:52 Why is m_wakeLock mutable? If you have a good reas
redchenko 2014/08/19 16:42:20 Done.
38 };
39
40 } // namespace WebCore
41
42 #endif // NavigatorWakeLock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698