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 #include "content/browser/wake_lock/wake_lock_service_impl.h" | |
6 | |
7 #include "content/browser/wake_lock/wake_lock_service_context.h" | |
8 | |
9 namespace content { | |
10 | |
11 WakeLockServiceImpl::WakeLockServiceImpl( | |
12 base::WeakPtr<WakeLockServiceContext> context, | |
13 RenderFrameHost* render_frame_host, | |
14 mojo::InterfaceRequest<WakeLockService> request) | |
15 : context_(context), | |
16 render_frame_host_(render_frame_host), | |
17 binding_(this, request.Pass()) { | |
18 } | |
19 | |
20 WakeLockServiceImpl::~WakeLockServiceImpl() { | |
21 } | |
22 | |
23 // static | |
24 void WakeLockServiceImpl::CreateService( | |
mlamouri (slow - plz ping)
2015/08/31 14:59:16
Is this method really needed given that it is only
alogvinov
2015/09/02 17:06:23
Removed.
| |
25 base::WeakPtr<WakeLockServiceContext> context, | |
26 RenderFrameHost* render_frame_host, | |
27 mojo::InterfaceRequest<WakeLockService> request) { | |
28 new WakeLockServiceImpl(context, render_frame_host, request.Pass()); | |
29 } | |
30 | |
31 void WakeLockServiceImpl::RequestWakeLock() { | |
32 if (context_) | |
33 context_->RequestWakeLock(render_frame_host_); | |
34 } | |
35 | |
36 void WakeLockServiceImpl::CancelWakeLock() { | |
37 if (context_) | |
38 context_->CancelWakeLock(render_frame_host_); | |
39 } | |
40 | |
41 } // namespace content | |
OLD | NEW |