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

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

Issue 397031: Launch processes asynchronously so as not to block the UI thread. For now, re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: return 0 instead of -1 if zygote couldn't launch renderer Created 11 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_host.cc
===================================================================
--- chrome/browser/extensions/extension_host.cc (revision 32255)
+++ chrome/browser/extensions/extension_host.cc (working copy)
@@ -124,6 +124,11 @@
render_view_host_->AllowBindings(BindingsPolicy::EXTENSION);
if (enable_dom_automation_)
render_view_host_->AllowBindings(BindingsPolicy::DOM_AUTOMATION);
+
+ // Listen for when the render process' handle is available so we can add it
+ // to the task manager then.
+ registrar_.Add(this, NotificationType::RENDERER_PROCESS_CREATED,
+ Source<RenderProcessHost>(render_process_host()));
}
ExtensionHost::~ExtensionHost() {
@@ -175,11 +180,6 @@
render_view_host_->CreateRenderView(profile_->GetRequestContext());
NavigateToURL(url_);
DCHECK(IsRenderViewLive());
- LOG(INFO) << "Sending EXTENSION_PROCESS_CREATED";
- NotificationService::current()->Notify(
- NotificationType::EXTENSION_PROCESS_CREATED,
- Source<Profile>(profile_),
- Details<ExtensionHost>(this));
}
void ExtensionHost::NavigateToURL(const GURL& url) {
@@ -216,6 +216,12 @@
NavigateToURL(url_);
} else if (type == NotificationType::BROWSER_THEME_CHANGED) {
InsertThemeCSS();
+ } else if (type == NotificationType::RENDERER_PROCESS_CREATED) {
+ LOG(INFO) << "Sending EXTENSION_PROCESS_CREATED";
+ NotificationService::current()->Notify(
+ NotificationType::EXTENSION_PROCESS_CREATED,
+ Source<Profile>(profile_),
+ Details<ExtensionHost>(this));
} else {
NOTREACHED();
}
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/renderer_host/browser_render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698