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

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: Don't remove Exit menu item from non win-ash platforms. Created 7 years, 9 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 command_updater_.UpdateCommandEnabled(IDC_RELOAD, true); 803 command_updater_.UpdateCommandEnabled(IDC_RELOAD, true);
804 command_updater_.UpdateCommandEnabled(IDC_RELOAD_IGNORING_CACHE, true); 804 command_updater_.UpdateCommandEnabled(IDC_RELOAD_IGNORING_CACHE, true);
805 command_updater_.UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE, true); 805 command_updater_.UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE, true);
806 806
807 // Window management commands 807 // Window management commands
808 command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true); 808 command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true);
809 command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true); 809 command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true);
810 command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true); 810 command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true);
811 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true); 811 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true);
812 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, false); 812 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, false);
813 #if defined(OS_WIN) && defined(USE_ASH)
814 if (browser_->host_desktop_type() != chrome::HOST_DESKTOP_TYPE_ASH)
815 command_updater_.UpdateCommandEnabled(IDC_EXIT, true);
816 #else
813 command_updater_.UpdateCommandEnabled(IDC_EXIT, true); 817 command_updater_.UpdateCommandEnabled(IDC_EXIT, true);
818 #endif
814 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true); 819 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true);
815 #if defined(OS_WIN) && defined(USE_ASH) && !defined(NDEBUG) 820 #if defined(OS_WIN) && defined(USE_ASH) && !defined(NDEBUG)
816 if (base::win::GetVersion() < base::win::VERSION_WIN8 && 821 if (base::win::GetVersion() < base::win::VERSION_WIN8 &&
817 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH) 822 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH)
818 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_ASH_DESKTOP, true); 823 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_ASH_DESKTOP, true);
819 #endif 824 #endif
820 825
821 // Page-related commands 826 // Page-related commands
822 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); 827 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true);
823 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); 828 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 1237
1233 BrowserWindow* BrowserCommandController::window() { 1238 BrowserWindow* BrowserCommandController::window() {
1234 return browser_->window(); 1239 return browser_->window();
1235 } 1240 }
1236 1241
1237 Profile* BrowserCommandController::profile() { 1242 Profile* BrowserCommandController::profile() {
1238 return browser_->profile(); 1243 return browser_->profile();
1239 } 1244 }
1240 1245
1241 } // namespace chrome 1246 } // 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