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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 65273002: Add a mechanism to pause and resume geolocation requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/content_jni.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 231b59df698d8b910fade41fff627e4838528f7f..67d75c71ecaaa7f106f04867063893ec048f5435 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -51,7 +51,6 @@
#include "content/browser/fileapi/chrome_blob_storage_context.h"
#include "content/browser/fileapi/fileapi_message_filter.h"
#include "content/browser/frame_host/render_frame_message_filter.h"
-#include "content/browser/geolocation/geolocation_dispatcher_host.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_process_host.h"
@@ -374,7 +373,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
supports_browser_plugin_(supports_browser_plugin),
is_guest_(is_guest),
gpu_observer_registered_(false),
- power_monitor_broadcaster_(this) {
+ power_monitor_broadcaster_(this),
+ geolocation_dispatcher_host_(NULL) {
widget_helper_ = new RenderWidgetHelper();
ChildProcessSecurityPolicyImpl::GetInstance()->Add(GetID());
@@ -654,12 +654,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
g_browser_plugin_geolocation_context.Get() =
new BrowserPluginGeolocationPermissionContext();
}
- AddFilter(GeolocationDispatcherHost::New(
- GetID(), g_browser_plugin_geolocation_context.Get().get()));
+ geolocation_dispatcher_host_ = GeolocationDispatcherHost::New(
+ GetID(), g_browser_plugin_geolocation_context.Get().get());
} else {
- AddFilter(GeolocationDispatcherHost::New(
- GetID(), browser_context->GetGeolocationPermissionContext()));
+ geolocation_dispatcher_host_ = GeolocationDispatcherHost::New(
+ GetID(), browser_context->GetGeolocationPermissionContext());
}
+ AddFilter(geolocation_dispatcher_host_);
gpu_message_filter_ = new GpuMessageFilter(GetID(), widget_helper_.get());
AddFilter(gpu_message_filter_);
#if defined(ENABLE_WEBRTC)
@@ -1439,6 +1440,7 @@ void RenderProcessHostImpl::Cleanup() {
channel_.reset();
gpu_message_filter_ = NULL;
message_port_message_filter_ = NULL;
+ geolocation_dispatcher_host_ = NULL;
// Remove ourself from the list of renderer processes so that we can't be
// reused in between now and when the Delete task runs.
@@ -1739,6 +1741,7 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead) {
channel_.reset();
gpu_message_filter_ = NULL;
message_port_message_filter_ = NULL;
+ geolocation_dispatcher_host_ = NULL;
IDMap<IPC::Listener>::iterator iter(&listeners_);
while (!iter.IsAtEnd()) {
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/content_jni.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698