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/chromeos | |
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/chromeos')
5 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/chromeos/status/clock_menu_button.h b/chrome/browser/chromeos/status/clock_menu_button.h index 76f214a..ee1d979 100644 --- a/chrome/browser/chromeos/status/clock_menu_button.h +++ b/chrome/browser/chromeos/status/clock_menu_button.h @@ -37,7 +37,7 @@ class ClockMenuButton : public StatusAreaButton, virtual menus::MenuModel::ItemType GetTypeAt(int index) const; virtual int GetCommandIdAt(int index) const { return index; } virtual string16 GetLabelAt(int index) const; - virtual bool IsLabelDynamicAt(int index) const { return true; } + virtual bool IsItemDynamicAt(int index) const { return true; } virtual bool GetAcceleratorAt(int index, menus::Accelerator* accelerator) const { return false; } virtual bool IsItemCheckedAt(int index) const { return false; } diff --git a/chrome/browser/chromeos/status/input_method_menu.cc b/chrome/browser/chromeos/status/input_method_menu.cc index 83082d3..1b659a0 100644 --- a/chrome/browser/chromeos/status/input_method_menu.cc +++ b/chrome/browser/chromeos/status/input_method_menu.cc @@ -181,7 +181,7 @@ int InputMethodMenu::GetCommandIdAt(int index) const { return 0; // dummy } -bool InputMethodMenu::IsLabelDynamicAt(int index) const { +bool InputMethodMenu::IsItemDynamicAt(int index) const { // Menu content for the language button could change time by time. return true; } diff --git a/chrome/browser/chromeos/status/input_method_menu.h b/chrome/browser/chromeos/status/input_method_menu.h index a25ee36..78562d1 100644 --- a/chrome/browser/chromeos/status/input_method_menu.h +++ b/chrome/browser/chromeos/status/input_method_menu.h @@ -44,7 +44,7 @@ class InputMethodMenu : public views::ViewMenuDelegate, virtual menus::MenuModel::ItemType GetTypeAt(int index) const; virtual int GetCommandIdAt(int index) const; virtual string16 GetLabelAt(int index) const; - virtual bool IsLabelDynamicAt(int index) const; + virtual bool IsItemDynamicAt(int index) const; virtual bool GetAcceleratorAt(int index, menus::Accelerator* accelerator) const; virtual bool IsItemCheckedAt(int index) const; diff --git a/chrome/browser/chromeos/status/network_menu.h b/chrome/browser/chromeos/status/network_menu.h index ea399fe..4e72ad2 100644 --- a/chrome/browser/chromeos/status/network_menu.h +++ b/chrome/browser/chromeos/status/network_menu.h @@ -93,7 +93,7 @@ class NetworkMenu : public views::ViewMenuDelegate, virtual menus::MenuModel::ItemType GetTypeAt(int index) const; virtual int GetCommandIdAt(int index) const { return index; } virtual string16 GetLabelAt(int index) const; - virtual bool IsLabelDynamicAt(int index) const { return true; } + virtual bool IsItemDynamicAt(int index) const { return true; } virtual const gfx::Font* GetLabelFontAt(int index) const; virtual bool GetAcceleratorAt(int index, menus::Accelerator* accelerator) const { return false; } diff --git a/chrome/browser/chromeos/status/power_menu_button.h b/chrome/browser/chromeos/status/power_menu_button.h index b3503e8..d3146ac 100644 --- a/chrome/browser/chromeos/status/power_menu_button.h +++ b/chrome/browser/chromeos/status/power_menu_button.h @@ -36,7 +36,7 @@ class PowerMenuButton : public StatusAreaButton, virtual menus::MenuModel::ItemType GetTypeAt(int index) const; virtual int GetCommandIdAt(int index) const { return index; } virtual string16 GetLabelAt(int index) const; - virtual bool IsLabelDynamicAt(int index) const { return true; } + virtual bool IsItemDynamicAt(int index) const { return true; } virtual bool GetAcceleratorAt(int index, menus::Accelerator* accelerator) const { return false; } virtual bool IsItemCheckedAt(int index) const { return false; } |