diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 20:38:50 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 20:38:50 +0000 |
commit | e0c5aaae87c949986cb3b5cc0b4e46d9b4d5560b (patch) | |
tree | 3768222f175fbc2d5cbfe435fa93a2411adb448c /chrome/browser/extensions/extension_host.cc | |
parent | 800bb46fd0494d613685ec1fd8c458901c19b58f (diff) | |
download | chromium_src-e0c5aaae87c949986cb3b5cc0b4e46d9b4d5560b.zip chromium_src-e0c5aaae87c949986cb3b5cc0b4e46d9b4d5560b.tar.gz chromium_src-e0c5aaae87c949986cb3b5cc0b4e46d9b4d5560b.tar.bz2 |
Merge 32264 - Launch processes asynchronously so as not to block the UI thread. For now, renderer only, I'll take care of plugin/worker/utility processes in a followup change. (relanding 32203)
BUG=6844,27935
Review URL: http://codereview.chromium.org/397031
TBR=jam@chromium.org
Review URL: http://codereview.chromium.org/408011
git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_host.cc')
-rw-r--r-- | chrome/browser/extensions/extension_host.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc index ba7d54b..28f7403 100644 --- a/chrome/browser/extensions/extension_host.cc +++ b/chrome/browser/extensions/extension_host.cc @@ -136,6 +136,11 @@ ExtensionHost::ExtensionHost(Extension* extension, SiteInstance* site_instance, registrar_.Add(this, NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE, Source<Profile>(profile_)); #endif + + // 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() { @@ -188,11 +193,6 @@ void ExtensionHost::CreateRenderViewNow() { render_view_host_->CreateRenderView(); 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) { @@ -238,6 +238,12 @@ void ExtensionHost::Observe(NotificationType type, DismissPopup(); #endif + } 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(); } |