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

Unified Diff: app/menus/menu_model.h

Issue 2928005: Retrieve favicons from history as NavigationEntries are converted from TabNav... Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years 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 | « no previous file | app/menus/simple_menu_model.h » ('j') | chrome/browser/ui/toolbar/back_forward_menu_model.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/menus/menu_model.h
===================================================================
--- app/menus/menu_model.h (revision 70178)
+++ app/menus/menu_model.h (working copy)
@@ -38,6 +38,14 @@
TYPE_SUBMENU
};
+ class Delegate {
+ public:
+ // Invoked when an icon has been loaded from history.
+ virtual void OnIconChanged(int model_index) {}
sky 2011/01/04 21:51:15 model_index -> index. No where else does the API t
+ protected:
+ virtual ~Delegate() {}
+ };
+
// Returns true if any of the items within the model have icons. Not all
// platforms support icons in menus natively and so this is a hint for
// triggering a custom rendering mode.
@@ -87,7 +95,7 @@
// Gets the icon for the item at the specified index, returning true if there
// is an icon, false otherwise.
- virtual bool GetIconAt(int index, SkBitmap* icon) const = 0;
+ virtual bool GetIconAt(int index, SkBitmap* icon) = 0;
// Returns the model for a menu item with a line of buttons at |index|.
virtual ButtonMenuItemModel* GetButtonMenuItemAt(int index) const = 0;
@@ -115,6 +123,9 @@
// Called when the menu is about to be shown.
virtual void MenuWillShow() {}
+ // Set the Delegate
+ virtual void SetDelegate(Delegate* delegate) = 0;
+
// Retrieves the model and index that contains a specific command id. Returns
// true if an item with the specified command id is found. |model| is inout,
// and specifies the model to start searching from.
« no previous file with comments | « no previous file | app/menus/simple_menu_model.h » ('j') | chrome/browser/ui/toolbar/back_forward_menu_model.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698