Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(841)

Unified Diff: ui/views/controls/menu/menu_item_view.cc

Issue 148143004: Add notification mechanism when BrowserActionButton's icon has been updated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/menu/menu_item_view.cc
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
index 15e7db39e64f632c32e0b4c4dd29f646515b5a0f..30162d19cb438c284c45b05c30d3db215aa37ac9 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -587,6 +587,9 @@ MenuItemView::MenuItemView(MenuItemView* parent,
MenuItemView::~MenuItemView() {
delete submenu_;
STLDeleteElements(&removed_items_);
+ if (lifecycle_observer_) {
+ lifecycle_observer_->OnDeleted(this);
+ }
Finnur 2014/02/10 10:41:41 nit: When the body of an if clause is only 1 line
}
const char* MenuItemView::GetClassName() const {
@@ -641,6 +644,7 @@ void MenuItemView::Init(MenuItemView* parent,
// Assign our ID, this allows SubmenuItemView to find MenuItemViews.
set_id(kMenuItemViewID);
has_icons_ = false;
+ lifecycle_observer_ = NULL;
Finnur 2014/02/10 10:41:41 Looks like the convention in this class is to null
Finnur 2014/02/12 11:19:52 Hmmm... Now that I look at this again I realize th
// Don't request enabled status from the root menu item as it is just
// a container for real items. EMPTY items will be disabled.
« ui/views/controls/menu/menu_item_view.h ('K') | « ui/views/controls/menu/menu_item_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698