summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_process_manager.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-07 00:12:29 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-07 00:12:29 +0000
commit4814b51fe8210920ec1ebdde20c8deb9e65a1ff9 (patch)
tree1849897669aa067acc1751bfd16941872aacd855 /chrome/browser/extensions/extension_process_manager.cc
parentcb99b6afc24241e7e42e7e51ab1c51472ce9b43c (diff)
downloadchromium_src-4814b51fe8210920ec1ebdde20c8deb9e65a1ff9.zip
chromium_src-4814b51fe8210920ec1ebdde20c8deb9e65a1ff9.tar.gz
chromium_src-4814b51fe8210920ec1ebdde20c8deb9e65a1ff9.tar.bz2
Make the inspector for the background page stay open when
reloading an extension. BUG=25287 TEST=Load an extension that has a background page and reload it. Inspector should stay open and continue working. Review URL: http://codereview.chromium.org/371040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_process_manager.cc')
-rw-r--r--chrome/browser/extensions/extension_process_manager.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index 06f3d58..64419bf 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -111,6 +111,17 @@ ExtensionHost* ExtensionProcessManager::CreateBackgroundHost(
return host;
}
+ExtensionHost* ExtensionProcessManager::GetBackgroundHostForExtension(
+ Extension* extension) {
+ for (ExtensionHostSet::iterator iter = background_hosts_.begin();
+ iter != background_hosts_.end(); ++iter) {
+ ExtensionHost* host = *iter;
+ if (host->extension() == extension)
+ return host;
+ }
+ return NULL;
+}
+
void ExtensionProcessManager::RegisterExtensionProcess(
const std::string& extension_id, int process_id) {
ProcessIDMap::const_iterator it = process_ids_.find(extension_id);