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

Unified Diff: device/wake_lock/wake_lock_service_context.cc

Issue 2867303003: Generalize the API of WakeLockContext mojo interface. (Closed)
Patch Set: Generalize the API of WakeLockContext 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/wake_lock/wake_lock_service_context.cc
diff --git a/device/wake_lock/wake_lock_service_context.cc b/device/wake_lock/wake_lock_service_context.cc
index 4652b33158452b098cf16c7020e37e1bb672f10f..affc0d56fdac3b2a7547137a5fd999c8bdfd1745 100644
--- a/device/wake_lock/wake_lock_service_context.cc
+++ b/device/wake_lock/wake_lock_service_context.cc
@@ -6,7 +6,6 @@
#include <utility>
-#include "device/power_save_blocker/power_save_blocker.h"
#include "device/wake_lock/wake_lock_service_impl.h"
namespace device {
@@ -22,14 +21,13 @@ WakeLockServiceContext::WakeLockServiceContext(
WakeLockServiceContext::~WakeLockServiceContext() {}
void WakeLockServiceContext::GetWakeLock(
+ mojom::WakeLockType type,
+ mojom::WakeLockReason reason,
+ const std::string& description,
mojom::WakeLockServiceRequest request) {
// WakeLockServiceImpl owns itself.
- new WakeLockServiceImpl(std::move(request),
- device::PowerSaveBlocker::PowerSaveBlockerType::
- kPowerSaveBlockPreventDisplaySleep,
- device::PowerSaveBlocker::Reason::kReasonOther,
- "Wake Lock API", context_id_, native_view_getter_,
- file_task_runner_);
+ new WakeLockServiceImpl(std::move(request), type, reason, description,
+ context_id_, native_view_getter_, file_task_runner_);
}
} // namespace device
« 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