OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WakeLockController_h |
| 6 #define WakeLockController_h |
| 7 |
| 8 #include "core/frame/LocalFrame.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class WebWakeLockClient; |
| 13 |
| 14 class WakeLockController final |
| 15 : public NoBaseWillBeGarbageCollected<WakeLockController> |
| 16 , public WillBeHeapSupplement<LocalFrame> { |
| 17 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WakeLockController); |
| 18 WTF_MAKE_NONCOPYABLE(WakeLockController); |
| 19 public: |
| 20 static PassOwnPtrWillBeRawPtr<WakeLockController> create(LocalFrame&, WebWak
eLockClient*); |
| 21 |
| 22 void requestKeepScreenAwake(bool); |
| 23 |
| 24 static const char* supplementName(); |
| 25 static WakeLockController* from(LocalFrame*); |
| 26 static void provideTo(LocalFrame&, WebWakeLockClient*); |
| 27 |
| 28 private: |
| 29 WakeLockController(LocalFrame&, WebWakeLockClient*); |
| 30 |
| 31 WebWakeLockClient* m_client; |
| 32 }; |
| 33 |
| 34 } // namespace blink |
| 35 |
| 36 #endif // WakeLockController |
OLD | NEW |