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 /chrome/browser/status_icons/status_icon.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 'chrome/browser/status_icons/status_icon.h')
-rw-r--r-- | chrome/browser/status_icons/status_icon.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/status_icons/status_icon.h b/chrome/browser/status_icons/status_icon.h index ccc8c2e..5e50961 100644 --- a/chrome/browser/status_icons/status_icon.h +++ b/chrome/browser/status_icons/status_icon.h @@ -9,15 +9,12 @@ #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "base/strings/string16.h" +#include "chrome/browser/status_icons/status_icon_menu_model.h" namespace gfx { class ImageSkia; } -namespace ui { -class MenuModel; -} - class StatusIconObserver; class StatusIcon { @@ -45,7 +42,7 @@ class StatusIcon { // Set the context menu for this icon. The icon takes ownership of the passed // context menu. Passing NULL results in no menu at all. - void SetContextMenu(ui::MenuModel* menu); + void SetContextMenu(scoped_ptr<StatusIconMenuModel> menu); // Adds/Removes an observer for clicks on the status icon. If an observer is // registered, then left clicks on the status icon will result in the observer @@ -67,13 +64,13 @@ class StatusIcon { // Invoked after a call to SetContextMenu() to let the platform-specific // subclass update the native context menu based on the new model. If NULL is // passed, subclass should destroy the native context menu. - virtual void UpdatePlatformContextMenu(ui::MenuModel* model) = 0; + virtual void UpdatePlatformContextMenu(StatusIconMenuModel* model) = 0; private: ObserverList<StatusIconObserver> observers_; // Context menu, if any. - scoped_ptr<ui::MenuModel> context_menu_contents_; + scoped_ptr<StatusIconMenuModel> context_menu_contents_; DISALLOW_COPY_AND_ASSIGN(StatusIcon); }; |