OLD | NEW |
(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 |
OLD | NEW |