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

Unified Diff: ui/base/models/menu_model_delegate.h

Issue 23530070: backup for dynamic recent tabs submenu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new RecentTabsMenuModelDelegate w/ new intf Created 7 years, 3 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
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | ui/base/models/simple_menu_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/models/menu_model_delegate.h
diff --git a/ui/base/models/menu_model_delegate.h b/ui/base/models/menu_model_delegate.h
index 9e2e335faff189b2bd38d343b93d1d162d4db4da..936f87533cc741a850ad699442aa50b29eb6282b 100644
--- a/ui/base/models/menu_model_delegate.h
+++ b/ui/base/models/menu_model_delegate.h
@@ -12,6 +12,18 @@ class MenuModelDelegate {
// Invoked when an icon has been loaded from history.
virtual void OnIconChanged(int index) = 0;
+ // Invoked prior to any calls to OnItemAdded()/OnItemRemoved().
+ virtual void PrepareForChange() {}
+
+ // Invoked when adding and removing items in MenuModel, delegate should
+ // add or remove items to or from the menu as per the model.
+ virtual void OnItemAdded(int index) {}
+ virtual void OnItemRemoved(int index) {}
+
+ // Invoked when MenuModel has finisheed the changes, delegate should finalize
+ // the menu and update the UI.
+ virtual void ChangesDone() {}
+
protected:
virtual ~MenuModelDelegate() {}
};
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | ui/base/models/simple_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698