| Index: device/wake_lock/wake_lock_context.cc
|
| diff --git a/device/wake_lock/wake_lock_service_context.cc b/device/wake_lock/wake_lock_context.cc
|
| similarity index 43%
|
| rename from device/wake_lock/wake_lock_service_context.cc
|
| rename to device/wake_lock/wake_lock_context.cc
|
| index 682a4f934cd20665911dc3349286d8a2fffcd88a..dd11d522243b379e3093997644b8d0588fb3280f 100644
|
| --- a/device/wake_lock/wake_lock_service_context.cc
|
| +++ b/device/wake_lock/wake_lock_context.cc
|
| @@ -2,17 +2,17 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "device/wake_lock/wake_lock_service_context.h"
|
| +#include "device/wake_lock/wake_lock_context.h"
|
|
|
| #include <utility>
|
|
|
| -#include "device/wake_lock/wake_lock_service_impl.h"
|
| +#include "device/wake_lock/wake_lock.h"
|
|
|
| namespace device {
|
|
|
| -const int WakeLockServiceContext::WakeLockInvalidContextId = -1;
|
| +const int WakeLockContext::WakeLockInvalidContextId = -1;
|
|
|
| -WakeLockServiceContext::WakeLockServiceContext(
|
| +WakeLockContext::WakeLockContext(
|
| int context_id,
|
| scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
|
| const WakeLockContextCallback& native_view_getter)
|
| @@ -20,16 +20,15 @@ WakeLockServiceContext::WakeLockServiceContext(
|
| context_id_(context_id),
|
| native_view_getter_(native_view_getter) {}
|
|
|
| -WakeLockServiceContext::~WakeLockServiceContext() {}
|
| +WakeLockContext::~WakeLockContext() {}
|
|
|
| -void WakeLockServiceContext::GetWakeLock(
|
| - mojom::WakeLockType type,
|
| - mojom::WakeLockReason reason,
|
| - const std::string& description,
|
| - mojom::WakeLockServiceRequest request) {
|
| - // WakeLockServiceImpl owns itself.
|
| - new WakeLockServiceImpl(std::move(request), type, reason, description,
|
| - context_id_, native_view_getter_, file_task_runner_);
|
| +void WakeLockContext::GetWakeLock(mojom::WakeLockType type,
|
| + mojom::WakeLockReason reason,
|
| + const std::string& description,
|
| + mojom::WakeLockRequest request) {
|
| + // WakeLock owns itself.
|
| + new WakeLock(std::move(request), type, reason, description, context_id_,
|
| + native_view_getter_, file_task_runner_);
|
| }
|
|
|
| } // namespace device
|
|
|