diff options
author | sidharthms@chromium.org <sidharthms@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-28 08:23:59 +0000 |
---|---|---|
committer | sidharthms@chromium.org <sidharthms@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-28 08:23:59 +0000 |
commit | f528059f1c18b4f5b29509d6270bed5812d8b467 (patch) | |
tree | f73e32df4235f022055f2376a16718ccaa00532f /ui/linux_ui/status_icon_linux.h | |
parent | afd7186b06526ff947e6df14ce25a51c7297ff47 (diff) | |
download | chromium_src-f528059f1c18b4f5b29509d6270bed5812d8b467.zip chromium_src-f528059f1c18b4f5b29509d6270bed5812d8b467.tar.gz chromium_src-f528059f1c18b4f5b29509d6270bed5812d8b467.tar.bz2 |
Update Status Icon menu when menu model changes (Linux Aura)
Status icon context menus currently do not update themselves when the menu model
changes or when the check state of a menu item changes. This patch fixes that
behavior.
BUG=263926,262395
Review URL: https://chromiumcodereview.appspot.com/20728003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219964 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/linux_ui/status_icon_linux.h')
-rw-r--r-- | ui/linux_ui/status_icon_linux.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/linux_ui/status_icon_linux.h b/ui/linux_ui/status_icon_linux.h index fbbf28f..2e3d3a9 100644 --- a/ui/linux_ui/status_icon_linux.h +++ b/ui/linux_ui/status_icon_linux.h @@ -19,7 +19,7 @@ class MenuModel; // Since liblinux_ui cannot have dependencies on any chrome browser components // we cannot inherit from StatusIcon. So we implement the necessary methods // and let a wrapper class implement the StatusIcon interface and defer the -// callbacks to a delegate. +// callbacks to a delegate. For the same reason, do not use StatusIconMenuModel. class LINUX_UI_EXPORT StatusIconLinux { public: class Delegate { @@ -43,6 +43,11 @@ class LINUX_UI_EXPORT StatusIconLinux { // subclass should destroy the existing native context menu on this call. virtual void UpdatePlatformContextMenu(ui::MenuModel* model) = 0; + // Update all the enabled/checked states and the dynamic labels. Some status + // icon implementations do not refresh the native menu before showing so we + // need to manually refresh it when the menu model changes. + virtual void RefreshPlatformContextMenu(); + Delegate* delegate() { return delegate_; } void set_delegate(Delegate* delegate) { delegate_ = delegate; } |