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

Unified Diff: chrome/browser/ui/gtk/menu_gtk.h

Issue 6732007: Native menu implementation for bug 5679. Followup to http://codereview.chromium.org/2928005/ Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: More code review updates. Created 9 years, 8 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: chrome/browser/ui/gtk/menu_gtk.h
diff --git a/chrome/browser/ui/gtk/menu_gtk.h b/chrome/browser/ui/gtk/menu_gtk.h
index 381993bbba5d367ffd4055807906588d3320b9c0..663895e780c69b7d81404ac4fdfe8303ca64604f 100644
--- a/chrome/browser/ui/gtk/menu_gtk.h
+++ b/chrome/browser/ui/gtk/menu_gtk.h
@@ -13,16 +13,16 @@
#include "base/task.h"
#include "ui/base/gtk/gtk_signal.h"
+#include "ui/base/models/menu_model.h"
#include "ui/gfx/point.h"
class SkBitmap;
namespace ui {
class ButtonMenuItemModel;
-class MenuModel;
}
-class MenuGtk {
+class MenuGtk : public ui::MenuModelDelegate {
public:
// Delegate class that lets another class control the status of the menu.
class Delegate {
@@ -98,6 +98,9 @@ class MenuGtk {
// Closes the menu.
void Cancel();
+ // From ui::MenuModelDelegate, called when a favicon is loaded from history.
+ virtual void OnIconChanged(int model_index) OVERRIDE;
+
// Repositions the menu to be right under the button. Alignment is set as
// object data on |void_widget| with the tag "left_align". If "left_align"
// is true, it aligns the left side of the menu with the left side of the
@@ -166,6 +169,9 @@ class MenuGtk {
// items.
static void SetMenuItemInfo(GtkWidget* widget, void* raw_menu);
+ // Update the icon for a particular menu_item (widget).
+ static void UpdateMenuIcon(GtkWidget* widget, gpointer userdata);
+
// Queries this object about the menu state.
MenuGtk::Delegate* delegate_;

Powered by Google App Engine
This is Rietveld 408576698