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

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

Issue 10119003: Pull shell window stuff out of ExtensionHost and put in ShellWindow (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated Created 8 years, 8 months 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_process_manager.cc
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index 47ec735fa0fbc35f8d94e5b215075fd02b9d84c9..5be9a1152c51139db92ff74ce754c025894a4b19 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -152,22 +152,6 @@ ExtensionProcessManager::~ExtensionProcessManager() {
DCHECK(background_hosts_.empty());
}
-ExtensionHost* ExtensionProcessManager::CreateShellHost(
- const Extension* extension,
- const GURL& url) {
- DCHECK(extension);
- ExtensionHost* host = new ExtensionHost(extension,
- GetSiteInstanceForURL(url),
- url,
- chrome::VIEW_TYPE_APP_SHELL);
- host->CreateViewWithoutBrowser();
- content::WebContents* host_contents = host->host_contents();
- host_contents->GetMutableRendererPrefs()->browser_handles_all_requests = true;
- host_contents->GetRenderViewHost()->SyncRendererPrefs();
- OnExtensionHostCreated(host, false /* not a background host */);
- return host;
-}
-
void ExtensionProcessManager::EnsureBrowserWhenRequired(
Browser* browser,
content::ViewType view_type) {
@@ -344,6 +328,11 @@ void ExtensionProcessManager::UnregisterRenderViewHost(
if (view == all_extension_views_.end())
return;
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_EXTENSION_VIEW_UNREGISTERED,
+ content::Source<Profile>(GetProfile()),
+ content::Details<RenderViewHost>(render_view_host));
benwells 2012/04/26 08:36:33 This is to keep the task manager from crashing if
+
content::ViewType view_type = view->second;
all_extension_views_.erase(view);
@@ -364,6 +353,11 @@ void ExtensionProcessManager::UpdateRegisteredRenderView(
if (view == all_extension_views_.end())
return;
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_EXTENSION_VIEW_REGISTERED,
+ content::Source<Profile>(GetProfile()),
+ content::Details<RenderViewHost>(render_view_host));
+
view->second = render_view_host->GetDelegate()->GetRenderViewType();
// Keep the lazy background page alive as long as any non-background-page
@@ -517,7 +511,6 @@ void ExtensionProcessManager::Observe(
ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
if (background_hosts_.erase(host))
background_page_data_.erase(host->extension()->id());
- platform_app_hosts_.erase(host);
break;
}
@@ -588,8 +581,6 @@ void ExtensionProcessManager::OnExtensionHostCreated(ExtensionHost* host,
DCHECK_EQ(site_instance_->GetBrowserContext(), host->profile());
if (is_background)
background_hosts_.insert(host);
- if (host->extension()->is_platform_app())
- platform_app_hosts_.insert(host);
}
void ExtensionProcessManager::CloseBackgroundHost(ExtensionHost* host) {

Powered by Google App Engine
This is Rietveld 408576698