Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 00d726e365e8d5b5dffe42d9c2f0f4243db1d44a..d6c8b3d0cd2f728cd8e81ee6876f3c3c5bde3424 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -4284,8 +4284,16 @@ void Browser::Observe(int type, |
TabStripModel* model = tab_handler_->GetTabStripModel(); |
for (int i = model->count() - 1; i >= 0; --i) { |
TabContents* tc = model->GetTabContentsAt(i)->tab_contents(); |
- if (tc->GetURL().SchemeIs(chrome::kExtensionScheme) && |
- tc->GetURL().host() == extension->id()) { |
+ bool close_tab_contents = |
+ tc->GetURL().SchemeIs(chrome::kExtensionScheme) && |
+ tc->GetURL().host() == extension->id(); |
+ if (!close_tab_contents) { |
jennb
2011/10/25 17:32:16
Should be a way to do what you want without adding
prasadt
2011/10/25 18:21:20
What I'm doing is panels specific though. I want t
|
+ // We want to close all panels originated by the unloaded extension. |
+ close_tab_contents = |
+ (web_app::GetExtensionIdFromApplicationName(app_name_) == |
+ extension->id()) && type_ == TYPE_PANEL; |
+ } |
+ if (close_tab_contents) { |
CloseTabContents(tc); |
} |
} |