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

Unified Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 324393002: Extension Toolbar redesign, part 1 (overflow) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Linux width issue Created 6 years, 6 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/toolbar/wrench_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 2b2d50f583508076255437dee2332c6c4dc20af9..fca62d6f42e81d0b96a1e428801ed370e0193c64 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -47,6 +47,7 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/common/feature_switch.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -529,6 +530,9 @@ void WrenchMenuModel::Build(bool is_new_menu) {
AddSeparator(ui::NORMAL_SEPARATOR);
#endif
+ if (extensions::FeatureSwitch::extension_action_redesign()->IsEnabled())
+ CreateExtensionToolbarOverflowMenu();
+
AddItemWithStringId(IDC_NEW_TAB, IDS_NEW_TAB);
AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW);
@@ -727,6 +731,13 @@ void WrenchMenuModel::AddGlobalErrorMenuItems() {
}
}
+void WrenchMenuModel::CreateExtensionToolbarOverflowMenu() {
+#if defined(TOOLKIT_VIEWS)
+ AddItem(IDC_EXTENSIONS_OVERFLOW_MENU, base::string16());
+ AddSeparator(ui::UPPER_SEPARATOR);
Peter Kasting 2014/06/30 23:36:33 Shouldn't we only add these if the overflow menu i
Finnur 2014/07/02 16:59:55 This experiment is behind a flag and more is neede
+#endif // defined(TOOLKIT_VIEWS)
+}
+
void WrenchMenuModel::CreateCutCopyPasteMenu(bool new_menu) {
AddSeparator(new_menu ? ui::LOWER_SEPARATOR : ui::NORMAL_SEPARATOR);

Powered by Google App Engine
This is Rietveld 408576698