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

Unified Diff: chrome/browser/ui/browser.cc

Issue 10945010: Switch BookmarkTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_adoption.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 5b5127b51c3893066ab3ad05c7dafc9c08bc45c4..aa5efc0fd4c3e9e9ad9f0c40f291be291ee3b884 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1749,8 +1749,9 @@ TabContents* Browser::GetConstrainingTabContents(TabContents* source) {
///////////////////////////////////////////////////////////////////////////////
// Browser, BookmarkTabHelperDelegate implementation:
-void Browser::URLStarredChanged(TabContents* source, bool starred) {
- if (source == chrome::GetActiveTabContents(this))
+void Browser::URLStarredChanged(content::WebContents* web_contents,
+ bool starred) {
+ if (web_contents == chrome::GetActiveWebContents(this))
window_->SetStarredState(starred);
}
@@ -2175,8 +2176,10 @@ void Browser::UpdateBookmarkBarState(BookmarkBarStateChangeReason reason) {
(!window_ || !window_->IsFullscreen())) {
state = BookmarkBar::SHOW;
} else {
- TabContents* tab = chrome::GetActiveTabContents(this);
- if (tab && tab->bookmark_tab_helper()->ShouldShowBookmarkBar())
+ WebContents* web_contents = chrome::GetActiveWebContents(this);
+ BookmarkTabHelper* bookmark_tab_helper =
+ web_contents ? BookmarkTabHelper::FromWebContents(web_contents) : NULL;
+ if (bookmark_tab_helper && bookmark_tab_helper->ShouldShowBookmarkBar())
state = BookmarkBar::DETACHED;
else
state = BookmarkBar::HIDDEN;
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_adoption.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698