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

Unified Diff: chrome/browser/ui/views/action_box_menu.cc

Issue 11026076: Added MenuConfig setter to MenuItemView, updated rest of the code to use set MenuConfig if it avail… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/browser/ui/views/action_box_menu.h ('k') | ui/views/controls/menu/menu_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/action_box_menu.cc
diff --git a/chrome/browser/ui/views/action_box_menu.cc b/chrome/browser/ui/views/action_box_menu.cc
index 7dc1f6f7b43f250893cf8ebf69e90b2a0f835c39..69b7d5f4db951d06670f6af53c57579cc51f2221 100644
--- a/chrome/browser/ui/views/action_box_menu.cc
+++ b/chrome/browser/ui/views/action_box_menu.cc
@@ -12,6 +12,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/views/bubble/bubble_border.h"
#include "ui/views/controls/button/menu_button.h"
+#include "ui/views/controls/menu/menu_config.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/view.h"
@@ -52,6 +53,12 @@ ActionBoxMenu::ActionBoxMenu(Browser* browser,
model_(model.Pass()) {
views::MenuItemView* menu = new views::MenuItemView(this);
menu->set_has_icons(true);
+
+ views::MenuConfig* menu_config = new views::MenuConfig();
+ CustomizeMenu(menu_config);
+ // |menu| will own MenuConfig
+ menu->set_menu_config(menu_config);
+
menu_runner_.reset(new views::MenuRunner(menu));
}
@@ -143,3 +150,7 @@ void ActionBoxMenu::PopulateMenu() {
}
}
}
+
+void ActionBoxMenu::CustomizeMenu(views::MenuConfig* menu_config) {
+ // TODO(yefim): add menu customization here.
+}
« no previous file with comments | « chrome/browser/ui/views/action_box_menu.h ('k') | ui/views/controls/menu/menu_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698