| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/extensions/extension_process_manager.h" | 5 #include "chrome/browser/extensions/extension_process_manager.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser.h" | 7 #include "chrome/browser/browser.h" |
| 8 #include "chrome/browser/browser_window.h" | 8 #include "chrome/browser/browser_window.h" |
| 9 #include "chrome/browser/browsing_instance.h" | 9 #include "chrome/browser/browsing_instance.h" |
| 10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 ExtensionsService* service = | 87 ExtensionsService* service = |
| 88 browsing_instance_->profile()->GetExtensionsService(); | 88 browsing_instance_->profile()->GetExtensionsService(); |
| 89 if (service) { | 89 if (service) { |
| 90 Extension* extension = service->GetExtensionByURL(url); | 90 Extension* extension = service->GetExtensionByURL(url); |
| 91 if (extension) | 91 if (extension) |
| 92 return CreateView(extension, url, browser, view_type); | 92 return CreateView(extension, url, browser, view_type); |
| 93 } | 93 } |
| 94 return NULL; | 94 return NULL; |
| 95 } | 95 } |
| 96 | 96 |
| 97 ExtensionHost* ExtensionProcessManager::CreateToolstrip(Extension* extension, | |
| 98 const GURL& url, | |
| 99 Browser* browser) { | |
| 100 return CreateView(extension, url, browser, ViewType::EXTENSION_TOOLSTRIP); | |
| 101 } | |
| 102 | |
| 103 ExtensionHost* ExtensionProcessManager::CreateToolstrip(const GURL& url, | |
| 104 Browser* browser) { | |
| 105 return CreateView(url, browser, ViewType::EXTENSION_TOOLSTRIP); | |
| 106 } | |
| 107 | |
| 108 ExtensionHost* ExtensionProcessManager::CreatePopup(Extension* extension, | 97 ExtensionHost* ExtensionProcessManager::CreatePopup(Extension* extension, |
| 109 const GURL& url, | 98 const GURL& url, |
| 110 Browser* browser) { | 99 Browser* browser) { |
| 111 return CreateView(extension, url, browser, ViewType::EXTENSION_POPUP); | 100 return CreateView(extension, url, browser, ViewType::EXTENSION_POPUP); |
| 112 } | 101 } |
| 113 | 102 |
| 114 ExtensionHost* ExtensionProcessManager::CreatePopup(const GURL& url, | 103 ExtensionHost* ExtensionProcessManager::CreatePopup(const GURL& url, |
| 115 Browser* browser) { | 104 Browser* browser) { |
| 116 return CreateView(url, browser, ViewType::EXTENSION_POPUP); | 105 return CreateView(url, browser, ViewType::EXTENSION_POPUP); |
| 117 } | 106 } |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 Details<ExtensionHost>(host)); | 294 Details<ExtensionHost>(host)); |
| 306 } | 295 } |
| 307 | 296 |
| 308 void ExtensionProcessManager::CloseBackgroundHosts() { | 297 void ExtensionProcessManager::CloseBackgroundHosts() { |
| 309 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); | 298 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); |
| 310 iter != background_hosts_.end(); ) { | 299 iter != background_hosts_.end(); ) { |
| 311 ExtensionHostSet::iterator current = iter++; | 300 ExtensionHostSet::iterator current = iter++; |
| 312 delete *current; | 301 delete *current; |
| 313 } | 302 } |
| 314 } | 303 } |
| OLD | NEW |