summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/bookmark_bar_gtk.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 01:25:51 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 01:25:51 +0000
commit26426a2af6a18a8e29bdf1eb09bee9f073304d1b (patch)
tree4a00da1c4a688d31807c93a0399a01fb3491842f /chrome/browser/gtk/bookmark_bar_gtk.cc
parent9ecd4839b28694359410478f6fab54ef7221d407 (diff)
downloadchromium_src-26426a2af6a18a8e29bdf1eb09bee9f073304d1b.zip
chromium_src-26426a2af6a18a8e29bdf1eb09bee9f073304d1b.tar.gz
chromium_src-26426a2af6a18a8e29bdf1eb09bee9f073304d1b.tar.bz2
Make BookmarkContextMenuGtk use a SimpleMenuModel. Also separate controller and view responsibilities.
This is the first step in re-merging bookmark context menus across platforms. BUG=32830 TEST=manual Review URL: http://codereview.chromium.org/555142 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37364 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/bookmark_bar_gtk.cc')
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc
index ad75450..19ef406 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/gtk/gtk_chrome_button.h"
#include "chrome/browser/gtk/gtk_theme_provider.h"
#include "chrome/browser/gtk/import_dialog_gtk.h"
+#include "chrome/browser/gtk/menu_gtk.h"
#include "chrome/browser/gtk/rounded_window.h"
#include "chrome/browser/gtk/tabstrip_origin_provider.h"
#include "chrome/browser/gtk/tabs/tab_strip_gtk.h"
@@ -914,10 +915,12 @@ void BookmarkBarGtk::PopupMenuForNode(GtkWidget* sender,
}
GtkWindow* window = GTK_WINDOW(gtk_widget_get_toplevel(sender));
- current_context_menu_.reset(new BookmarkContextMenuGtk(
- window, profile_, browser_, page_navigator_,
- parent, nodes,
- BookmarkContextMenuGtk::BOOKMARK_BAR, NULL));
+ current_context_menu_controller_.reset(
+ new BookmarkContextMenuGtk(
+ window, profile_, browser_, page_navigator_, parent, nodes,
+ BookmarkContextMenuGtk::BOOKMARK_BAR, NULL));
+ current_context_menu_.reset(
+ new MenuGtk(NULL, current_context_menu_controller_->menu_model()));
current_context_menu_->PopupAsContext(event->time);
}