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..2016134466f2080b94eb7fa627fd3e9970945bef |
--- /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_) |
nasko
2015/09/02 22:40:15
style: indentation uses 2 spaces, not 4.
alogvinov
2015/09/03 16:25:00
Done.
|
+ context_->RequestWakeLock(render_frame_host_); |
+} |
+ |
+void WakeLockServiceImpl::CancelWakeLock() { |
+ if (context_) |
+ context_->CancelWakeLock(render_frame_host_); |
+} |
+ |
+} // namespace content |