Index: Source/modules/wake_lock/NavigatorWakeLock.h |
diff --git a/Source/modules/wake_lock/NavigatorWakeLock.h b/Source/modules/wake_lock/NavigatorWakeLock.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7714c15410cbc6f7ce894dd799af80deb43c82fc |
--- /dev/null |
+++ b/Source/modules/wake_lock/NavigatorWakeLock.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef NavigatorWakeLock_h |
+#define NavigatorWakeLock_h |
+ |
+#include "core/frame/DOMWindowProperty.h" |
+#include "platform/Supplementable.h" |
+#include "platform/heap/Handle.h" |
+ |
+namespace blink { |
+ |
+class LocalFrame; |
+class Navigator; |
+class WakeLock; |
+ |
+class NavigatorWakeLock FINAL |
+ : public NoBaseWillBeGarbageCollectedFinalized<NavigatorWakeLock> |
+ , public WillBeHeapSupplement<Navigator> |
+ , 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.
|
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorWakeLock); |
+ |
mlamouri (slow - plz ping)
2014/08/18 12:15:52
nit: remove this empty line.
redchenko
2014/08/19 16:42:20
Done.
|
+public: |
+ virtual ~NavigatorWakeLock(); |
+ static NavigatorWakeLock& from(Navigator&); |
+ |
+ static WakeLock* wakeLock(Navigator&); |
+ WakeLock* wakeLock() const; |
+ |
+ void trace(Visitor*); |
+ |
+private: |
+ 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.
|
+ static const char* supplementName(); |
+ |
+ 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.
|
+}; |
+ |
+} // namespace WebCore |
+ |
+#endif // NavigatorWakeLock_h |