| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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_context_provider.h" | 5 #include "device/wake_lock/wake_lock_context_provider.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "mojo/public/cpp/bindings/strong_binding.h" | 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 void WakeLockContextProvider::GetWakeLockContextForID( | 31 void WakeLockContextProvider::GetWakeLockContextForID( |
| 32 int context_id, | 32 int context_id, |
| 33 mojo::InterfaceRequest<mojom::WakeLockContext> request) { | 33 mojo::InterfaceRequest<mojom::WakeLockContext> request) { |
| 34 mojo::MakeStrongBinding( | 34 mojo::MakeStrongBinding( |
| 35 base::MakeUnique<WakeLockServiceContext>(context_id, file_task_runner_, | 35 base::MakeUnique<WakeLockServiceContext>(context_id, file_task_runner_, |
| 36 native_view_getter_), | 36 native_view_getter_), |
| 37 std::move(request)); | 37 std::move(request)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void WakeLockContextProvider::GetUnassociatedWakeLockContext( |
| 41 mojo::InterfaceRequest<mojom::WakeLockContext> request) { |
| 42 mojo::MakeStrongBinding(base::MakeUnique<WakeLockServiceContext>( |
| 43 WakeLockServiceContext::WakeLockInvalidContextId, |
| 44 file_task_runner_, native_view_getter_), |
| 45 std::move(request)); |
| 46 } |
| 47 |
| 40 } // namespace device | 48 } // namespace device |
| OLD | NEW |