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

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

Issue 10677009: Move command handling and updating off Browser and onto a helper object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/toolbar/wrench_menu_model.cc
===================================================================
--- chrome/browser/ui/toolbar/wrench_menu_model.cc (revision 144460)
+++ chrome/browser/ui/toolbar/wrench_menu_model.cc (working copy)
@@ -119,12 +119,12 @@
}
bool EncodingMenuModel::IsCommandIdEnabled(int command_id) const {
- bool enabled = browser_->command_updater()->IsCommandEnabled(command_id);
+ bool enabled = chrome::IsCommandEnabled(browser_, command_id);
// Special handling for the contents of the Encoding submenu. On Mac OS,
// instead of enabling/disabling the top-level menu item, the submenu's
// contents get disabled, per Apple's HIG.
#if defined(OS_MACOSX)
- enabled &= browser_->command_updater()->IsCommandEnabled(IDC_ENCODING_MENU);
+ enabled &= chrome::IsCommandEnabled(browser_, IDC_ENCODING_MENU);
#endif
return enabled;
}
@@ -136,7 +136,7 @@
}
void EncodingMenuModel::ExecuteCommand(int command_id) {
- browser_->ExecuteCommand(command_id);
+ chrome::ExecuteCommand(browser_, command_id);
}
////////////////////////////////////////////////////////////////////////////////
@@ -342,7 +342,7 @@
if (command_id == IDC_HELP_PAGE_VIA_MENU)
content::RecordAction(UserMetricsAction("ShowHelpTabViaWrenchMenu"));
- browser_->ExecuteCommand(command_id);
+ chrome::ExecuteCommand(browser_, command_id);
}
bool WrenchMenuModel::IsCommandIdChecked(int command_id) const {
@@ -361,7 +361,7 @@
if (error)
return true;
- return browser_->command_updater()->IsCommandEnabled(command_id);
+ return chrome::IsCommandEnabled(browser_, command_id);
}
bool WrenchMenuModel::IsCommandIdVisible(int command_id) const {
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_cocoa.mm ('k') | chrome/browser/ui/views/avatar_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698