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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 1411063007: Add mojo::StrongBindingSet and use it in GeolocationServiceContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | content/browser/devtools/protocol/emulation_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 7aa79eefc542720c2b9e04e982dd5930607d2fee..3f7624661b2b3d0bcf2d34933ecaab93bfabfb90 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -364,10 +364,15 @@ jint ContentViewCoreImpl::GetBackgroundColor(JNIEnv* env, jobject obj) {
}
void ContentViewCoreImpl::PauseOrResumeGeolocation(bool should_pause) {
- if (should_pause)
- web_contents_->GetGeolocationServiceContext()->PauseUpdates();
- else
- web_contents_->GetGeolocationServiceContext()->ResumeUpdates();
+ if (should_pause) {
+ GeolocationServiceContext::GetOrCreateForWebContents(web_contents_)
+ ->PauseUpdates();
+ } else {
+ GeolocationServiceContext* geolocation_service_context =
+ GeolocationServiceContext::FromWebContents(web_contents_);
+ if (geolocation_service_context)
+ geolocation_service_context->ResumeUpdates();
+ }
}
// All positions and sizes are in CSS pixels.
« no previous file with comments | « no previous file | content/browser/devtools/protocol/emulation_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698