Index: content/browser/android/content_view_core_impl.cc |
=================================================================== |
--- content/browser/android/content_view_core_impl.cc (revision 269041) |
+++ content/browser/android/content_view_core_impl.cc (working copy) |
@@ -224,8 +224,7 @@ |
dpi_scale_(GetPrimaryDisplayDeviceScaleFactor()), |
view_android_(view_android), |
window_android_(window_android), |
- device_orientation_(0), |
- geolocation_needs_pause_(false) { |
+ device_orientation_(0) { |
CHECK(web_contents) << |
"A ContentViewCoreImpl should be created with a valid WebContents."; |
@@ -332,8 +331,6 @@ |
} |
} |
SetFocusInternal(HasFocus()); |
- if (geolocation_needs_pause_) |
- PauseOrResumeGeolocation(true); |
break; |
} |
case NOTIFICATION_RENDERER_PROCESS_CREATED: { |
@@ -418,23 +415,7 @@ |
} |
void ContentViewCoreImpl::PauseOrResumeGeolocation(bool should_pause) { |
- geolocation_needs_pause_ = should_pause; |
- RenderViewHostImpl* rvh = |
- static_cast<RenderViewHostImpl*>(web_contents_->GetRenderViewHost()); |
- if (rvh) { |
- scoped_refptr<GeolocationDispatcherHost> geolocation_dispatcher = |
- static_cast<RenderProcessHostImpl*>( |
- web_contents_->GetRenderProcessHost())-> |
- geolocation_dispatcher_host(); |
- if (geolocation_dispatcher.get()) { |
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
- base::Bind(&GeolocationDispatcherHost::PauseOrResume, |
- geolocation_dispatcher, |
- rvh->GetRoutingID(), |
- should_pause)); |
- geolocation_needs_pause_ = false; |
- } |
- } |
+ web_contents_->geolocation_dispatcher_host()->PauseOrResume(should_pause); |
} |
// All positions and sizes are in CSS pixels. |