Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 211273007: Split InfoBarService core code into InfoBarManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android compile Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 86eb5995f16525ca4fc8dd59fafc17171f4934ee..e656c8cfe0541a569a5957988819d385e6c408a1 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -831,8 +831,13 @@ void BrowserView::OnActiveTabChanged(content::WebContents* old_contents,
contents_web_view_->SetWebContents(NULL);
devtools_web_view_->SetWebContents(NULL);
}
- infobar_container_->ChangeInfoBarService(
- InfoBarService::FromWebContents(new_contents));
+
+ InfoBarManager* infobar_manager = NULL;
+ InfoBarService* infobar_service =
+ InfoBarService::FromWebContents(new_contents);
+ if (infobar_service)
+ infobar_manager = infobar_service->infobar_manager();
+ infobar_container_->ChangeInfoBarManager(infobar_manager);
if (old_contents && PermissionBubbleManager::FromWebContents(old_contents))
PermissionBubbleManager::FromWebContents(old_contents)->SetView(NULL);
@@ -1490,7 +1495,7 @@ void BrowserView::TabDetachedAt(WebContents* contents, int index) {
// freed. This is because the focus manager performs some operations
// on the selected WebContents when it is removed.
contents_web_view_->SetWebContents(NULL);
- infobar_container_->ChangeInfoBarService(NULL);
+ infobar_container_->ChangeInfoBarManager(NULL);
UpdateDevToolsForContents(NULL, true);
}
}

Powered by Google App Engine
This is Rietveld 408576698