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

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

Issue 11298004: alternate ntp: add "Recent Tabs" submenu to wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased to resolve conflicts Created 8 years, 1 month 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/toolbar/wrench_menu_model.h ('k') | chrome/browser/ui/views/toolbar_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bc13616eddabcb5ac8060a6b85b19adb09cb35ff..59765ffca0a70bcdd3233940ba160ca112dfa2ff 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -33,9 +33,12 @@
#include "chrome/browser/ui/global_error/global_error.h"
#include "chrome/browser/ui/global_error/global_error_service.h"
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
+#include "chrome/browser/ui/search/search.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/browser/ui/toolbar/bookmark_sub_menu_model.h"
#include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
+#include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h"
#include "chrome/browser/upgrade_detector.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -510,6 +513,14 @@ void WrenchMenuModel::Build(bool is_new_menu, bool supports_new_separators) {
AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU,
bookmark_sub_menu_model_.get());
+ if (chrome::search::IsInstantExtendedAPIEnabled(browser_->profile())) {
+ recent_tabs_sub_menu_model_.reset(new RecentTabsSubMenuModel(provider_,
+ browser_,
+ NULL));
+ AddSubMenuWithStringId(IDC_RECENT_TABS_MENU, IDS_RECENT_TABS_MENU,
+ recent_tabs_sub_menu_model_.get());
+ }
+
#if defined(OS_WIN)
if (base::win::IsMetroProcess()) {
// Metro mode, add the 'Relaunch Chrome in desktop mode'.
« no previous file with comments | « chrome/browser/ui/toolbar/wrench_menu_model.h ('k') | chrome/browser/ui/views/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698