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

Side by Side Diff: device/wake_lock/wake_lock_context.cc

Issue 2921823002: Rationalize WakeLock naming conventions (Closed)
Patch Set: rebase Created 3 years, 6 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 | « device/wake_lock/wake_lock_context.h ('k') | device/wake_lock/wake_lock_for_testing.h » ('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 "device/wake_lock/wake_lock_service_context.h" 5 #include "device/wake_lock/wake_lock_context.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "device/wake_lock/wake_lock_service_impl.h" 9 #include "device/wake_lock/wake_lock.h"
10 10
11 namespace device { 11 namespace device {
12 12
13 const int WakeLockServiceContext::WakeLockInvalidContextId = -1; 13 const int WakeLockContext::WakeLockInvalidContextId = -1;
14 14
15 WakeLockServiceContext::WakeLockServiceContext( 15 WakeLockContext::WakeLockContext(
16 int context_id, 16 int context_id,
17 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, 17 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
18 const WakeLockContextCallback& native_view_getter) 18 const WakeLockContextCallback& native_view_getter)
19 : file_task_runner_(std::move(file_task_runner)), 19 : file_task_runner_(std::move(file_task_runner)),
20 context_id_(context_id), 20 context_id_(context_id),
21 native_view_getter_(native_view_getter) {} 21 native_view_getter_(native_view_getter) {}
22 22
23 WakeLockServiceContext::~WakeLockServiceContext() {} 23 WakeLockContext::~WakeLockContext() {}
24 24
25 void WakeLockServiceContext::GetWakeLock( 25 void WakeLockContext::GetWakeLock(mojom::WakeLockType type,
26 mojom::WakeLockType type, 26 mojom::WakeLockReason reason,
27 mojom::WakeLockReason reason, 27 const std::string& description,
28 const std::string& description, 28 mojom::WakeLockRequest request) {
29 mojom::WakeLockServiceRequest request) { 29 // WakeLock owns itself.
30 // WakeLockServiceImpl owns itself. 30 new WakeLock(std::move(request), type, reason, description, context_id_,
31 new WakeLockServiceImpl(std::move(request), type, reason, description, 31 native_view_getter_, file_task_runner_);
32 context_id_, native_view_getter_, file_task_runner_);
33 } 32 }
34 33
35 } // namespace device 34 } // namespace device
OLDNEW
« no previous file with comments | « device/wake_lock/wake_lock_context.h ('k') | device/wake_lock/wake_lock_for_testing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698