Index: chrome/browser/ui/gtk/browser_window_gtk.cc |
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc |
index 58288972d72b7aee719122f1291ba2f93ef6dd9d..15eb4be03ef1046344824ff54c4cc7735c7acd6a 100644 |
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc |
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc |
@@ -802,8 +802,12 @@ void BrowserWindowGtk::OnActiveTabChanged(WebContents* old_contents, |
// Update various elements that are interested in knowing the current |
// WebContents. |
- infobar_container_->ChangeInfoBarService( |
- InfoBarService::FromWebContents(new_contents)); |
+ InfoBarManager* infobar_manager = NULL; |
blundell
2014/03/31 08:29:22
Optional thought for a follow-up CL: You use this
Peter Kasting
2014/03/31 20:05:34
This comment made me glance at this code (which I
droger
2014/04/01 10:48:34
InfoBarService::FromWebContents() indeed returns N
|
+ InfoBarService* infobar_service = |
+ InfoBarService::FromWebContents(new_contents); |
+ if (infobar_service) |
+ infobar_manager = infobar_service->infobar_manager(); |
+ infobar_container_->ChangeInfoBarManager(infobar_manager); |
contents_container_->SetTab(new_contents); |
UpdateDevToolsForContents(new_contents); |
@@ -1285,7 +1289,7 @@ void BrowserWindowGtk::TabDetachedAt(WebContents* contents, int index) { |
// browser_->tab_strip_model()->GetActiveWebContents() will return NULL or |
// something else. |
if (index == browser_->tab_strip_model()->active_index()) { |
- infobar_container_->ChangeInfoBarService(NULL); |
+ infobar_container_->ChangeInfoBarManager(NULL); |
UpdateDevToolsForContents(NULL); |
} |
contents_container_->DetachTab(contents); |