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

Unified Diff: content/browser/wake_lock/wake_lock_service_impl.cc

Issue 2389743002: Content Modularization Project: Move Wake Lock to //device (Closed)
Patch Set: Eliminate frame reference Created 4 years, 2 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
Index: content/browser/wake_lock/wake_lock_service_impl.cc
diff --git a/content/browser/wake_lock/wake_lock_service_impl.cc b/content/browser/wake_lock/wake_lock_service_impl.cc
deleted file mode 100644
index 6e0d159f631129bcfac9eb61e55cff994585b5ce..0000000000000000000000000000000000000000
--- a/content/browser/wake_lock/wake_lock_service_impl.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/wake_lock/wake_lock_service_impl.h"
-
-#include <utility>
-
-#include "content/browser/wake_lock/wake_lock_service_context.h"
-
-namespace content {
-
-WakeLockServiceImpl::WakeLockServiceImpl(
- base::WeakPtr<WakeLockServiceContext> context)
- : context_(context), wake_lock_request_outstanding_(false) {}
-
-WakeLockServiceImpl::~WakeLockServiceImpl() {
- CancelWakeLock();
-}
-
-void WakeLockServiceImpl::RequestWakeLock() {
- if (!context_ || wake_lock_request_outstanding_)
- return;
-
- wake_lock_request_outstanding_ = true;
- context_->RequestWakeLock();
-}
-
-void WakeLockServiceImpl::CancelWakeLock() {
- if (!context_ || !wake_lock_request_outstanding_)
- return;
-
- wake_lock_request_outstanding_ = false;
- context_->CancelWakeLock();
-}
-
-} // namespace content
« no previous file with comments | « content/browser/wake_lock/wake_lock_service_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698