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

Side by Side Diff: chrome/browser/ui/browser_command_controller.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser_command_controller.h" 5 #include "chrome/browser/ui/browser_command_controller.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/defaults.h" 9 #include "chrome/browser/defaults.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false); 844 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false);
845 UpdateCommandsForDevTools(); 845 UpdateCommandsForDevTools();
846 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, CanOpenTaskManager()); 846 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, CanOpenTaskManager());
847 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, 847 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY,
848 !Profile::IsGuestSession()); 848 !Profile::IsGuestSession());
849 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); 849 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
850 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_KEYBOARD, true); 850 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_KEYBOARD, true);
851 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true); 851 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true);
852 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, 852 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU,
853 !Profile::IsGuestSession()); 853 !Profile::IsGuestSession());
854 command_updater_.UpdateCommandEnabled(IDC_RECENT_TABS_MENU,
855 !Profile::IsGuestSession() &&
856 !profile()->IsOffTheRecord());
854 857
855 command_updater_.UpdateCommandEnabled( 858 command_updater_.UpdateCommandEnabled(
856 IDC_SHOW_SYNC_SETUP, profile()->GetOriginalProfile()->IsSyncAccessible()); 859 IDC_SHOW_SYNC_SETUP, profile()->GetOriginalProfile()->IsSyncAccessible());
857 860
858 // Initialize other commands based on the window type. 861 // Initialize other commands based on the window type.
859 bool normal_window = browser_->is_type_tabbed(); 862 bool normal_window = browser_->is_type_tabbed();
860 863
861 // Navigation commands 864 // Navigation commands
862 command_updater_.UpdateCommandEnabled(IDC_HOME, normal_window); 865 command_updater_.UpdateCommandEnabled(IDC_HOME, normal_window);
863 866
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 1184
1182 BrowserWindow* BrowserCommandController::window() { 1185 BrowserWindow* BrowserCommandController::window() {
1183 return browser_->window(); 1186 return browser_->window();
1184 } 1187 }
1185 1188
1186 Profile* BrowserCommandController::profile() { 1189 Profile* BrowserCommandController::profile() {
1187 return browser_->profile(); 1190 return browser_->profile();
1188 } 1191 }
1189 1192
1190 } // namespace chrome 1193 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator.h ('k') | chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698