| Index: content/browser/wake_lock/wake_lock_service_impl.cc
|
| diff --git a/content/browser/wake_lock/wake_lock_service_impl.cc b/content/browser/wake_lock/wake_lock_service_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8f648349c78392663fc2cc4ee3d40e4d5f1afd09
|
| --- /dev/null
|
| +++ b/content/browser/wake_lock/wake_lock_service_impl.cc
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2015 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.
|
| +
|
| +#include "content/browser/wake_lock/wake_lock_service_impl.h"
|
| +
|
| +#include "content/browser/wake_lock/wake_lock_service_context.h"
|
| +
|
| +namespace content {
|
| +
|
| +WakeLockServiceImpl::WakeLockServiceImpl(
|
| + base::WeakPtr<WakeLockServiceContext> context,
|
| + const RenderFrameHost* render_frame_host,
|
| + mojo::InterfaceRequest<WakeLockService> request)
|
| + : context_(context),
|
| + render_frame_host_(render_frame_host),
|
| + binding_(this, request.Pass()) {
|
| +}
|
| +
|
| +WakeLockServiceImpl::~WakeLockServiceImpl() {
|
| +}
|
| +
|
| +void WakeLockServiceImpl::RequestWakeLock() {
|
| + if (context_)
|
| + context_->RequestWakeLock(render_frame_host_);
|
| +}
|
| +
|
| +void WakeLockServiceImpl::CancelWakeLock() {
|
| + if (context_)
|
| + context_->CancelWakeLock(render_frame_host_);
|
| +}
|
| +
|
| +} // namespace content
|
|
|