Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Side by Side Diff: content/browser/wake_lock/wake_lock_service_impl.cc

Issue 1794553002: [Playground] Onion Soup: moving ScreenWakeLock to Blink modules/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit DEPS Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/wake_lock/wake_lock_service_impl.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/wake_lock/wake_lock_service_impl.h" 5 #include "content/browser/wake_lock/wake_lock_service_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/browser/wake_lock/wake_lock_service_context.h" 9 #include "content/browser/wake_lock/wake_lock_service_context.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 WakeLockServiceImpl::WakeLockServiceImpl( 13 WakeLockServiceImpl::WakeLockServiceImpl(
14 base::WeakPtr<WakeLockServiceContext> context, 14 base::WeakPtr<WakeLockServiceContext> context,
15 int render_process_id, 15 int render_process_id,
16 int render_frame_id, 16 int render_frame_id,
17 mojo::InterfaceRequest<mojom::WakeLockService> request) 17 mojo::InterfaceRequest<blink::mojom::WakeLockService> request)
18 : context_(context), 18 : context_(context),
19 render_process_id_(render_process_id), 19 render_process_id_(render_process_id),
20 render_frame_id_(render_frame_id), 20 render_frame_id_(render_frame_id),
21 binding_(this, std::move(request)) {} 21 binding_(this, std::move(request)) {}
22 22
23 WakeLockServiceImpl::~WakeLockServiceImpl() {} 23 WakeLockServiceImpl::~WakeLockServiceImpl() {}
24 24
25 void WakeLockServiceImpl::RequestWakeLock() { 25 void WakeLockServiceImpl::RequestWakeLock() {
26 if (context_) 26 if (context_)
27 context_->RequestWakeLock(render_process_id_, render_frame_id_); 27 context_->RequestWakeLock(render_process_id_, render_frame_id_);
28 } 28 }
29 29
30 void WakeLockServiceImpl::CancelWakeLock() { 30 void WakeLockServiceImpl::CancelWakeLock() {
31 if (context_) 31 if (context_)
32 context_->CancelWakeLock(render_process_id_, render_frame_id_); 32 context_->CancelWakeLock(render_process_id_, render_frame_id_);
33 } 33 }
34 34
35 } // namespace content 35 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/wake_lock/wake_lock_service_impl.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698