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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

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_command_controller.cc ('k') | chrome/browser/ui/cocoa/tabpose_window.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index 1f31c4728a2f977e9a6b13e5994eb3ec6d4c2edd..6d69a975e70b557e321df53271a60419e7915074 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -486,8 +486,10 @@ willPositionSheet:(NSWindow*)sheet
- (BOOL)shouldShowDetachedBookmarkBar {
DCHECK(browser_.get());
- TabContents* tab = chrome::GetActiveTabContents(browser_.get());
- return (tab && tab->bookmark_tab_helper()->ShouldShowBookmarkBar() &&
+ WebContents* web_contents = chrome::GetActiveWebContents(browser_.get());
+ BookmarkTabHelper* bookmark_tab_helper =
+ web_contents ? BookmarkTabHelper::FromWebContents(web_contents) : NULL;
+ return (bookmark_tab_helper && bookmark_tab_helper->ShouldShowBookmarkBar() &&
![previewableContentsController_ isShowingPreview]);
}
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | chrome/browser/ui/cocoa/tabpose_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698