Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 4266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4277 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { | 4277 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { |
| 4278 if (window()->GetLocationBar()) | 4278 if (window()->GetLocationBar()) |
| 4279 window()->GetLocationBar()->UpdatePageActions(); | 4279 window()->GetLocationBar()->UpdatePageActions(); |
| 4280 | 4280 |
| 4281 // Close any tabs from the unloaded extension. | 4281 // Close any tabs from the unloaded extension. |
| 4282 const Extension* extension = | 4282 const Extension* extension = |
| 4283 content::Details<UnloadedExtensionInfo>(details)->extension; | 4283 content::Details<UnloadedExtensionInfo>(details)->extension; |
| 4284 TabStripModel* model = tab_handler_->GetTabStripModel(); | 4284 TabStripModel* model = tab_handler_->GetTabStripModel(); |
| 4285 for (int i = model->count() - 1; i >= 0; --i) { | 4285 for (int i = model->count() - 1; i >= 0; --i) { |
| 4286 TabContents* tc = model->GetTabContentsAt(i)->tab_contents(); | 4286 TabContents* tc = model->GetTabContentsAt(i)->tab_contents(); |
| 4287 if (tc->GetURL().SchemeIs(chrome::kExtensionScheme) && | 4287 bool close_tab_contents = |
| 4288 tc->GetURL().host() == extension->id()) { | 4288 tc->GetURL().SchemeIs(chrome::kExtensionScheme) && |
| 4289 tc->GetURL().host() == extension->id(); | |
| 4290 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
| |
| 4291 // We want to close all panels originated by the unloaded extension. | |
| 4292 close_tab_contents = | |
| 4293 (web_app::GetExtensionIdFromApplicationName(app_name_) == | |
| 4294 extension->id()) && type_ == TYPE_PANEL; | |
| 4295 } | |
| 4296 if (close_tab_contents) { | |
| 4289 CloseTabContents(tc); | 4297 CloseTabContents(tc); |
| 4290 } | 4298 } |
| 4291 } | 4299 } |
| 4292 | 4300 |
| 4293 break; | 4301 break; |
| 4294 } | 4302 } |
| 4295 | 4303 |
| 4296 case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: { | 4304 case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: { |
| 4297 Profile* profile = content::Source<Profile>(source).ptr(); | 4305 Profile* profile = content::Source<Profile>(source).ptr(); |
| 4298 if (profile_->IsSameProfile(profile) && window()->GetLocationBar()) | 4306 if (profile_->IsSameProfile(profile) && window()->GetLocationBar()) |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5526 } | 5534 } |
| 5527 | 5535 |
| 5528 void Browser::UpdateFullscreenExitBubbleContent() { | 5536 void Browser::UpdateFullscreenExitBubbleContent() { |
| 5529 GURL url; | 5537 GURL url; |
| 5530 if (fullscreened_tab_) | 5538 if (fullscreened_tab_) |
| 5531 url = fullscreened_tab_->tab_contents()->GetURL(); | 5539 url = fullscreened_tab_->tab_contents()->GetURL(); |
| 5532 | 5540 |
| 5533 window_->UpdateFullscreenExitBubbleContent( | 5541 window_->UpdateFullscreenExitBubbleContent( |
| 5534 url, GetFullscreenExitBubbleType()); | 5542 url, GetFullscreenExitBubbleType()); |
| 5535 } | 5543 } |
| OLD | NEW |