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

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

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 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
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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 command_updater_.UpdateCommandEnabled(IDC_RELOAD_IGNORING_CACHE, true); 882 command_updater_.UpdateCommandEnabled(IDC_RELOAD_IGNORING_CACHE, true);
883 command_updater_.UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE, true); 883 command_updater_.UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE, true);
884 884
885 // Window management commands 885 // Window management commands
886 command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true); 886 command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true);
887 command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true); 887 command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true);
888 command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true); 888 command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true);
889 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true); 889 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true);
890 UpdateTabRestoreCommandState(); 890 UpdateTabRestoreCommandState();
891 #if defined(OS_WIN) && defined(USE_ASH) 891 #if defined(OS_WIN) && defined(USE_ASH)
892 if (browser_->host_desktop_type() != chrome::HOST_DESKTOP_TYPE_ASH) 892 if (browser_->host_desktop_type() != ui::HOST_DESKTOP_TYPE_ASH)
893 command_updater_.UpdateCommandEnabled(IDC_EXIT, true); 893 command_updater_.UpdateCommandEnabled(IDC_EXIT, true);
894 #else 894 #else
895 command_updater_.UpdateCommandEnabled(IDC_EXIT, true); 895 command_updater_.UpdateCommandEnabled(IDC_EXIT, true);
896 #endif 896 #endif
897 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true); 897 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true);
898 #if defined(USE_ASH) 898 #if defined(USE_ASH)
899 command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true); 899 command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true);
900 #endif 900 #endif
901 #if defined(OS_CHROMEOS) 901 #if defined(OS_CHROMEOS)
902 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true); 902 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_0, normal_window); 1001 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_0, normal_window);
1002 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_1, normal_window); 1002 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_1, normal_window);
1003 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_2, normal_window); 1003 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_2, normal_window);
1004 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_3, normal_window); 1004 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_3, normal_window);
1005 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_4, normal_window); 1005 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_4, normal_window);
1006 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_5, normal_window); 1006 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_5, normal_window);
1007 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_6, normal_window); 1007 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_6, normal_window);
1008 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_7, normal_window); 1008 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_7, normal_window);
1009 command_updater_.UpdateCommandEnabled(IDC_SELECT_LAST_TAB, normal_window); 1009 command_updater_.UpdateCommandEnabled(IDC_SELECT_LAST_TAB, normal_window);
1010 #if defined(OS_WIN) 1010 #if defined(OS_WIN)
1011 bool metro = browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH; 1011 bool metro = browser_->host_desktop_type() == ui::HOST_DESKTOP_TYPE_ASH;
1012 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_ENABLE, metro); 1012 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_ENABLE, metro);
1013 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_DISABLE, metro); 1013 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_DISABLE, metro);
1014 int restart_mode = metro ? IDC_WIN_DESKTOP_RESTART : 1014 int restart_mode = metro ? IDC_WIN_DESKTOP_RESTART :
1015 (base::win::GetVersion() >= base::win::VERSION_WIN8 ? 1015 (base::win::GetVersion() >= base::win::VERSION_WIN8 ?
1016 IDC_WIN8_METRO_RESTART : IDC_WIN_CHROMEOS_RESTART); 1016 IDC_WIN8_METRO_RESTART : IDC_WIN_CHROMEOS_RESTART);
1017 command_updater_.UpdateCommandEnabled(restart_mode, normal_window); 1017 command_updater_.UpdateCommandEnabled(restart_mode, normal_window);
1018 #endif 1018 #endif
1019 1019
1020 // These are always enabled; the menu determines their menu item visibility. 1020 // These are always enabled; the menu determines their menu item visibility.
1021 command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true); 1021 command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true);
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 1361
1362 BrowserWindow* BrowserCommandController::window() { 1362 BrowserWindow* BrowserCommandController::window() {
1363 return browser_->window(); 1363 return browser_->window();
1364 } 1364 }
1365 1365
1366 Profile* BrowserCommandController::profile() { 1366 Profile* BrowserCommandController::profile() {
1367 return browser_->profile(); 1367 return browser_->profile();
1368 } 1368 }
1369 1369
1370 } // namespace chrome 1370 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698