| 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 CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_ | |
| 6 #define CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_ | |
| 7 | |
| 8 #include "content/common/wake_lock_service.mojom.h" | |
| 9 #include "content/public/renderer/render_frame_observer.h" | |
| 10 #include "third_party/WebKit/public/platform/modules/wake_lock/WebWakeLockClient
.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 // WakeLockDispatcher sends wake lock messages to the browser process using the | |
| 15 // Mojo WakeLockService. | |
| 16 class WakeLockDispatcher | |
| 17 : public RenderFrameObserver, | |
| 18 public blink::WebWakeLockClient { | |
| 19 public: | |
| 20 explicit WakeLockDispatcher(RenderFrame* render_frame); | |
| 21 ~WakeLockDispatcher() override; | |
| 22 | |
| 23 private: | |
| 24 // WebWakeLockClient implementation. | |
| 25 virtual void requestKeepScreenAwake(bool keepScreenAwake); | |
| 26 | |
| 27 WakeLockServicePtr wake_lock_service_; | |
| 28 }; | |
| 29 | |
| 30 } // namespace content | |
| 31 | |
| 32 #endif // CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_ | |
| OLD | NEW |