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

Unified Diff: chrome/browser/extensions/extension_event_router.cc

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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: chrome/browser/extensions/extension_event_router.cc
===================================================================
--- chrome/browser/extensions/extension_event_router.cc (revision 110303)
+++ chrome/browser/extensions/extension_event_router.cc (working copy)
@@ -21,8 +21,8 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/browser/child_process_security_policy.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
using content::BrowserThread;
@@ -114,7 +114,8 @@
listeners_[event_name].insert(listener);
if (extension_devtools_manager_.get())
- extension_devtools_manager_->AddEventListener(event_name, process->id());
+ extension_devtools_manager_->AddEventListener(event_name,
+ process->GetID());
// We lazily tell the TaskManager to start updating when listeners to the
// processes.onUpdated event arrive.
@@ -128,14 +129,15 @@
const std::string& extension_id) {
EventListener listener(process, extension_id);
DCHECK_EQ(listeners_[event_name].count(listener), 1u) <<
- " PID=" << process->id() << " extension=" << extension_id <<
+ " PID=" << process->GetID() << " extension=" << extension_id <<
" event=" << event_name;
listeners_[event_name].erase(listener);
// Note: extension_id may point to data in the now-deleted listeners_ object.
// Do not use.
if (extension_devtools_manager_.get())
- extension_devtools_manager_->RemoveEventListener(event_name, process->id());
+ extension_devtools_manager_->RemoveEventListener(event_name,
+ process->GetID());
// If a processes.onUpdated event listener is removed (or a process with one
// exits), then we let the TaskManager know that it has one fewer listener.
@@ -271,10 +273,10 @@
continue;
Profile* listener_profile = Profile::FromBrowserContext(
- listener->process->browser_context());
+ listener->process->GetBrowserContext());
extensions::ProcessMap* process_map =
listener_profile->GetExtensionService()->process_map();
- if (!process_map->Contains(extension->id(), listener->process->id()))
+ if (!process_map->Contains(extension->id(), listener->process->GetID()))
continue;
// Is this event from a different profile than the renderer (ie, an

Powered by Google App Engine
This is Rietveld 408576698