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_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_IMPL_H_ |
| 7 |
| 8 #include "base/memory/weak_ptr.h" |
| 9 #include "content/common/wake_lock_service.mojom.h" |
| 10 #include "mojo/public/cpp/bindings/interface_request.h" |
| 11 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 class RenderFrameHost; |
| 16 class WakeLockServiceContext; |
| 17 |
| 18 class WakeLockServiceImpl: public WakeLockService { |
| 19 public: |
| 20 WakeLockServiceImpl(base::WeakPtr<WakeLockServiceContext> context, |
| 21 const RenderFrameHost* render_frame_host, |
| 22 mojo::InterfaceRequest<WakeLockService> request); |
| 23 ~WakeLockServiceImpl() override; |
| 24 |
| 25 // WakeLockSevice implementation. |
| 26 void RequestWakeLock() override; |
| 27 void CancelWakeLock() override; |
| 28 |
| 29 private: |
| 30 base::WeakPtr<WakeLockServiceContext> context_; |
| 31 const RenderFrameHost* render_frame_host_; |
| 32 mojo::StrongBinding<WakeLockService> binding_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(WakeLockServiceImpl); |
| 35 }; |
| 36 |
| 37 } // namespace content |
| 38 |
| 39 #endif // CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_IMPL_H_ |
OLD | NEW |