diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-15 06:48:55 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-15 06:48:55 +0000 |
commit | 0b282f9e8acb6b4b945df8121814a4cfba71dc32 (patch) | |
tree | 97182e3f900fbc6b86a6c1c4cb3542cfa3a216d7 /chrome/browser/notifications | |
parent | 7e6db17fdb7a995f70249881c399e522e69fb257 (diff) | |
download | chromium_src-0b282f9e8acb6b4b945df8121814a4cfba71dc32.zip chromium_src-0b282f9e8acb6b4b945df8121814a4cfba71dc32.tar.gz chromium_src-0b282f9e8acb6b4b945df8121814a4cfba71dc32.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/notifications')
-rw-r--r-- | chrome/browser/notifications/notification_options_menu_model.cc | 2 | ||||
-rw-r--r-- | chrome/browser/notifications/notification_options_menu_model.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/notifications/notification_options_menu_model.cc b/chrome/browser/notifications/notification_options_menu_model.cc index a100397..4190dcd 100644 --- a/chrome/browser/notifications/notification_options_menu_model.cc +++ b/chrome/browser/notifications/notification_options_menu_model.cc @@ -54,7 +54,7 @@ NotificationOptionsMenuModel::NotificationOptionsMenuModel(Balloon* balloon) NotificationOptionsMenuModel::~NotificationOptionsMenuModel() { } -bool NotificationOptionsMenuModel::IsLabelForCommandIdDynamic(int command_id) +bool NotificationOptionsMenuModel::IsItemForCommandIdDynamic(int command_id) const { return command_id == kTogglePermissionCommand || command_id == kToggleExtensionCommand; diff --git a/chrome/browser/notifications/notification_options_menu_model.h b/chrome/browser/notifications/notification_options_menu_model.h index b276e11..f7f4c77 100644 --- a/chrome/browser/notifications/notification_options_menu_model.h +++ b/chrome/browser/notifications/notification_options_menu_model.h @@ -16,7 +16,7 @@ class NotificationOptionsMenuModel : public menus::SimpleMenuModel, virtual ~NotificationOptionsMenuModel(); // Overridden from menus::SimpleMenuModel: - virtual bool IsLabelForCommandIdDynamic(int command_id) const; + virtual bool IsItemForCommandIdDynamic(int command_id) const; virtual string16 GetLabelForCommandId(int command_id) const; // Overridden from menus::SimpleMenuModel::Delegate: |