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

Side by Side Diff: chrome/browser/extensions/extension_process_manager.cc

Issue 8985008: Don't use browser windows for platform app shell windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable PlatformAppBrowserTest.AppWithContextMenu on Windows Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "chrome/browser/extensions/extension_process_manager.h" 7 #include "chrome/browser/extensions/extension_process_manager.h"
8 8
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "content/browser/browsing_instance.h" 10 #include "content/browser/browsing_instance.h"
11 #include "chrome/browser/extensions/extension_event_router.h" 11 #include "chrome/browser/extensions/extension_event_router.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 content::Source<Profile>(profile)); 108 content::Source<Profile>(profile));
109 registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING, 109 registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
110 content::NotificationService::AllSources()); 110 content::NotificationService::AllSources());
111 } 111 }
112 112
113 ExtensionProcessManager::~ExtensionProcessManager() { 113 ExtensionProcessManager::~ExtensionProcessManager() {
114 CloseBackgroundHosts(); 114 CloseBackgroundHosts();
115 DCHECK(background_hosts_.empty()); 115 DCHECK(background_hosts_.empty());
116 } 116 }
117 117
118 ExtensionHost* ExtensionProcessManager::CreateShellHost(
119 const Extension* extension,
120 const GURL& url) {
121 DCHECK(extension);
122 ExtensionHost* host = new ExtensionHost(extension,
123 GetSiteInstanceForURL(url),
124 url,
125 chrome::VIEW_TYPE_APP_SHELL);
126 host->CreateViewWithoutBrowser();
127 OnExtensionHostCreated(host, false /* not a background host */);
128 return host;
129 }
130
118 ExtensionHost* ExtensionProcessManager::CreateViewHost( 131 ExtensionHost* ExtensionProcessManager::CreateViewHost(
119 const Extension* extension, 132 const Extension* extension,
120 const GURL& url, 133 const GURL& url,
121 Browser* browser, 134 Browser* browser,
122 content::ViewType view_type) { 135 content::ViewType view_type) {
123 DCHECK(extension); 136 DCHECK(extension);
124 // A NULL browser may only be given for pop-up views. 137 // A NULL browser may only be given for pop-up views.
125 DCHECK(browser || 138 DCHECK(browser ||
126 (!browser && view_type == chrome::VIEW_TYPE_EXTENSION_POPUP)); 139 (!browser && view_type == chrome::VIEW_TYPE_EXTENSION_POPUP));
127 ExtensionHost* host = 140 ExtensionHost* host =
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 if (service && service->is_ready()) 497 if (service && service->is_ready())
485 CreateBackgroundHostsForProfileStartup(this, service->extensions()); 498 CreateBackgroundHostsForProfileStartup(this, service->extensions());
486 } 499 }
487 break; 500 break;
488 } 501 }
489 default: 502 default:
490 ExtensionProcessManager::Observe(type, source, details); 503 ExtensionProcessManager::Observe(type, source, details);
491 break; 504 break;
492 } 505 }
493 } 506 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698