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

Side by Side Diff: device/wake_lock/wake_lock_service_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_service_context.h ('k') | device/wake_lock/wake_lock_service_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 "device/wake_lock/wake_lock_service_context.h"
6
7 #include <utility>
8
9 #include "device/wake_lock/wake_lock_service_impl.h"
10
11 namespace device {
12
13 const int WakeLockServiceContext::WakeLockInvalidContextId = -1;
14
15 WakeLockServiceContext::WakeLockServiceContext(
16 int context_id,
17 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
18 const WakeLockContextCallback& native_view_getter)
19 : file_task_runner_(std::move(file_task_runner)),
20 context_id_(context_id),
21 native_view_getter_(native_view_getter) {}
22
23 WakeLockServiceContext::~WakeLockServiceContext() {}
24
25 void WakeLockServiceContext::GetWakeLock(
26 mojom::WakeLockType type,
27 mojom::WakeLockReason reason,
28 const std::string& description,
29 mojom::WakeLockServiceRequest request) {
30 // WakeLockServiceImpl owns itself.
31 new WakeLockServiceImpl(std::move(request), type, reason, description,
32 context_id_, native_view_getter_, file_task_runner_);
33 }
34
35 } // namespace device
OLDNEW
« no previous file with comments | « device/wake_lock/wake_lock_service_context.h ('k') | device/wake_lock/wake_lock_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698