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

Unified Diff: chrome/browser/ui/browser_command_controller.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_adoption.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_command_controller.cc
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 2d4c48ca45518fc8f523fdad450afc9614fbd88a..3a4be68a10b1abf0d677b2f95bfdd4cbfd5bb1d9 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -946,10 +946,9 @@ void BrowserCommandController::UpdateCommandsForIncognitoAvailability() {
}
void BrowserCommandController::UpdateCommandsForTabState() {
- TabContents* current_tab_contents = chrome::GetActiveTabContents(browser_);
- if (!current_tab_contents) // May be NULL during tab restore.
+ WebContents* current_web_contents = chrome::GetActiveWebContents(browser_);
+ if (!current_web_contents) // May be NULL during tab restore.
return;
- WebContents* current_web_contents = current_tab_contents->web_contents();
// Navigation commands
command_updater_.UpdateCommandEnabled(IDC_BACK, CanGoBack(browser_));
@@ -966,7 +965,7 @@ void BrowserCommandController::UpdateCommandsForTabState() {
// Page-related commands
window()->SetStarredState(
- current_tab_contents->bookmark_tab_helper()->is_starred());
+ BookmarkTabHelper::FromWebContents(current_web_contents)->is_starred());
window()->ZoomChangedForActiveTab(false);
command_updater_.UpdateCommandEnabled(IDC_VIEW_SOURCE,
CanViewSource(browser_));
« no previous file with comments | « chrome/browser/ui/browser_adoption.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698