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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2734943003: Device Service: Decouple Wake Lock from //content (Closed)
Patch Set: Rebase Created 3 years, 9 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/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d3765ab98bb09c23acae50d68960863434ffd5b8..445cf50ac40b5e2f826db0d82f90f4955c7b07cb 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -126,7 +126,6 @@
#include "content/public/common/web_preferences.h"
#include "device/geolocation/geolocation_service_context.h"
#include "device/nfc/nfc.mojom.h"
-#include "device/wake_lock/wake_lock_service_context.h"
#include "net/base/url_util.h"
#include "net/http/http_cache.h"
#include "net/http/http_transaction_factory.h"
@@ -481,10 +480,9 @@ WebContentsImpl::WebContentsImpl(BrowserContext* browser_context)
#if BUILDFLAG(ENABLE_PLUGINS)
pepper_playback_observer_.reset(new PepperPlaybackObserver(this));
#endif
+
+ wake_lock_context_host_.reset(new WakeLockContextHost(this));
loader_io_thread_notifier_.reset(new LoaderIOThreadNotifier(this));
- wake_lock_service_context_.reset(new device::WakeLockServiceContext(
- BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
- base::Bind(&WebContentsImpl::GetNativeView, base::Unretained(this))));
host_zoom_map_observer_.reset(new HostZoomMapObserver(this));
}
@@ -2485,8 +2483,8 @@ WebContentsImpl::GetGeolocationServiceContext() {
return geolocation_service_context_.get();
}
-device::WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() {
- return wake_lock_service_context_.get();
+device::mojom::WakeLockContext* WebContentsImpl::GetWakeLockServiceContext() {
+ return wake_lock_context_host_->GetWakeLockContext();
}
void WebContentsImpl::OnShowValidationMessage(
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698