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

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 platform app tests on non-GTK platforms. 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) 2012 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"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 content::Source<Profile>(profile)); 109 content::Source<Profile>(profile));
110 registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING, 110 registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
111 content::NotificationService::AllSources()); 111 content::NotificationService::AllSources());
112 } 112 }
113 113
114 ExtensionProcessManager::~ExtensionProcessManager() { 114 ExtensionProcessManager::~ExtensionProcessManager() {
115 CloseBackgroundHosts(); 115 CloseBackgroundHosts();
116 DCHECK(background_hosts_.empty()); 116 DCHECK(background_hosts_.empty());
117 } 117 }
118 118
119 ExtensionHost* ExtensionProcessManager::CreateShellHost(
120 const Extension* extension,
121 const GURL& url) {
122 DCHECK(extension);
123 ExtensionHost* host = new ExtensionHost(extension,
124 GetSiteInstanceForURL(url),
125 url,
126 chrome::VIEW_TYPE_APP_SHELL);
127 host->CreateViewWithoutBrowser();
128 OnExtensionHostCreated(host, false /* not a background host */);
129 return host;
130 }
131
119 ExtensionHost* ExtensionProcessManager::CreateViewHost( 132 ExtensionHost* ExtensionProcessManager::CreateViewHost(
120 const Extension* extension, 133 const Extension* extension,
121 const GURL& url, 134 const GURL& url,
122 Browser* browser, 135 Browser* browser,
123 content::ViewType view_type) { 136 content::ViewType view_type) {
124 DCHECK(extension); 137 DCHECK(extension);
125 // A NULL browser may only be given for pop-up views. 138 // A NULL browser may only be given for pop-up views.
126 DCHECK(browser || 139 DCHECK(browser ||
127 (!browser && view_type == chrome::VIEW_TYPE_EXTENSION_POPUP)); 140 (!browser && view_type == chrome::VIEW_TYPE_EXTENSION_POPUP));
128 ExtensionHost* host = 141 ExtensionHost* host =
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 if (service && service->is_ready()) 498 if (service && service->is_ready())
486 CreateBackgroundHostsForProfileStartup(this, service->extensions()); 499 CreateBackgroundHostsForProfileStartup(this, service->extensions());
487 } 500 }
488 break; 501 break;
489 } 502 }
490 default: 503 default:
491 ExtensionProcessManager::Observe(type, source, details); 504 ExtensionProcessManager::Observe(type, source, details);
492 break; 505 break;
493 } 506 }
494 } 507 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_process_manager.h ('k') | chrome/browser/extensions/platform_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698