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

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

Issue 12321139: Revert 184588 because it leaves the Exit menu disabled on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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) 813 command_updater_.UpdateCommandEnabled(IDC_EXIT, true);
814 if (browser_->host_desktop_type() != chrome::HOST_DESKTOP_TYPE_ASH)
815 command_updater_.UpdateCommandEnabled(IDC_EXIT, true);
816 #endif
817 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true); 814 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true);
818 #if defined(OS_WIN) && defined(USE_ASH) && !defined(NDEBUG) 815 #if defined(OS_WIN) && defined(USE_ASH) && !defined(NDEBUG)
819 if (base::win::GetVersion() < base::win::VERSION_WIN8 && 816 if (base::win::GetVersion() < base::win::VERSION_WIN8 &&
820 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH) 817 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH)
821 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_ASH_DESKTOP, true); 818 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_ASH_DESKTOP, true);
822 #endif 819 #endif
823 820
824 // Page-related commands 821 // Page-related commands
825 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); 822 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true);
826 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); 823 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 1232
1236 BrowserWindow* BrowserCommandController::window() { 1233 BrowserWindow* BrowserCommandController::window() {
1237 return browser_->window(); 1234 return browser_->window();
1238 } 1235 }
1239 1236
1240 Profile* BrowserCommandController::profile() { 1237 Profile* BrowserCommandController::profile() {
1241 return browser_->profile(); 1238 return browser_->profile();
1242 } 1239 }
1243 1240
1244 } // namespace chrome 1241 } // 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