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

Side by Side Diff: chrome/browser/ui/browser_command_controller.cc

Issue 12330056: Remove the Exit menu item from the Wrench menu in Win/Ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update accelerator unit test. Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/defaults.h" 10 #include "chrome/browser/defaults.h"
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 command_updater_.UpdateCommandEnabled(IDC_RELOAD, true); 802 command_updater_.UpdateCommandEnabled(IDC_RELOAD, true);
803 command_updater_.UpdateCommandEnabled(IDC_RELOAD_IGNORING_CACHE, true); 803 command_updater_.UpdateCommandEnabled(IDC_RELOAD_IGNORING_CACHE, true);
804 command_updater_.UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE, true); 804 command_updater_.UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE, true);
805 805
806 // Window management commands 806 // Window management commands
807 command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true); 807 command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true);
808 command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true); 808 command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true);
809 command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true); 809 command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true);
810 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true); 810 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true);
811 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, false); 811 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, false);
812 command_updater_.UpdateCommandEnabled(IDC_EXIT, true); 812 #if defined(OS_WIN) && defined(USE_ASH)
813 if (browser_->host_desktop_type() != chrome::HOST_DESKTOP_TYPE_ASH)
814 command_updater_.UpdateCommandEnabled(IDC_EXIT, true);
Andrew T Wilson (Slow) 2013/02/26 16:29:36 Note that this code is no longer executed on non-w
815 #endif
813 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true); 816 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true);
814 #if defined(OS_WIN) && defined(USE_ASH) && !defined(NDEBUG) 817 #if defined(OS_WIN) && defined(USE_ASH) && !defined(NDEBUG)
815 if (base::win::GetVersion() < base::win::VERSION_WIN8 && 818 if (base::win::GetVersion() < base::win::VERSION_WIN8 &&
816 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH) 819 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH)
817 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_ASH_DESKTOP, true); 820 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_ASH_DESKTOP, true);
818 #endif 821 #endif
819 822
820 // Page-related commands 823 // Page-related commands
821 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); 824 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true);
822 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); 825 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 1234
1232 BrowserWindow* BrowserCommandController::window() { 1235 BrowserWindow* BrowserCommandController::window() {
1233 return browser_->window(); 1236 return browser_->window();
1234 } 1237 }
1235 1238
1236 Profile* BrowserCommandController::profile() { 1239 Profile* BrowserCommandController::profile() {
1237 return browser_->profile(); 1240 return browser_->profile();
1238 } 1241 }
1239 1242
1240 } // namespace chrome 1243 } // namespace chrome
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698