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

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

Issue 2874013002: Add GetWakeLockWithoutContext() in WakeLockContextProvider mojo interface. (Closed)
Patch Set: Add GetWakeLockWithoutContext in WakeLockContextProvider mojo interface. Created 3 years, 7 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_provider.h ('k') | device/wake_lock/wake_lock_provider.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 2017 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_context_provider.h"
6
7 #include <utility>
8
9 #include "mojo/public/cpp/bindings/strong_binding.h"
10
11 namespace device {
12
13 // static
14 void WakeLockContextProvider::Create(
15 mojom::WakeLockContextProviderRequest request,
16 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
17 const WakeLockContextCallback& native_view_getter) {
18 mojo::MakeStrongBinding(base::MakeUnique<WakeLockContextProvider>(
19 std::move(file_task_runner), native_view_getter),
20 std::move(request));
21 }
22
23 WakeLockContextProvider::WakeLockContextProvider(
24 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
25 const WakeLockContextCallback& native_view_getter)
26 : file_task_runner_(std::move(file_task_runner)),
27 native_view_getter_(native_view_getter) {}
28
29 WakeLockContextProvider::~WakeLockContextProvider() {}
30
31 void WakeLockContextProvider::GetWakeLockContextForID(
32 int context_id,
33 mojo::InterfaceRequest<mojom::WakeLockContext> request) {
34 mojo::MakeStrongBinding(
35 base::MakeUnique<WakeLockServiceContext>(context_id, file_task_runner_,
36 native_view_getter_),
37 std::move(request));
38 }
39
40 } // namespace device
OLDNEW
« no previous file with comments | « device/wake_lock/wake_lock_context_provider.h ('k') | device/wake_lock/wake_lock_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698