From 0b282f9e8acb6b4b945df8121814a4cfba71dc32 Mon Sep 17 00:00:00 2001 From: "atwilson@chromium.org" Date: Wed, 15 Dec 2010 06:48:55 +0000 Subject: Change menus on OSX to update the icon dynamically. Change MenuModel::IsLabelDynamicAt() to IsItemDynamicAt() to reflect its true purpose. Add SimpleMenuModel::GetIconForCommandId() to enable dynamic icons. Update OSX menu_controller code to update the icon for dynamic menu items when the menu is opened, to match the windows behavior. BUG=66508 TEST=MenuControllerTest.Dynamic Review URL: http://codereview.chromium.org/5697005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69234 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/download/download_shelf.cc | 2 +- chrome/browser/download/download_shelf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'chrome/browser/download') diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc index 404bb2b..3380789 100644 --- a/chrome/browser/download/download_shelf.cc +++ b/chrome/browser/download/download_shelf.cc @@ -114,7 +114,7 @@ bool DownloadShelfContextMenu::GetAcceleratorForCommandId( return false; } -bool DownloadShelfContextMenu::IsLabelForCommandIdDynamic( +bool DownloadShelfContextMenu::IsItemForCommandIdDynamic( int command_id) const { return command_id == TOGGLE_PAUSE; } diff --git a/chrome/browser/download/download_shelf.h b/chrome/browser/download/download_shelf.h index b85123c..ab565fa 100644 --- a/chrome/browser/download/download_shelf.h +++ b/chrome/browser/download/download_shelf.h @@ -73,7 +73,7 @@ class DownloadShelfContextMenu : public menus::SimpleMenuModel::Delegate { virtual void ExecuteCommand(int command_id); virtual bool GetAcceleratorForCommandId(int command_id, menus::Accelerator* accelerator); - virtual bool IsLabelForCommandIdDynamic(int command_id) const; + virtual bool IsItemForCommandIdDynamic(int command_id) const; virtual string16 GetLabelForCommandId(int command_id) const; // A model to control the cancel behavior. -- cgit v1.1