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

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

Issue 13139004: Deprecate Browser::TYPE_PANEL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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
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 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, options_enabled); 1140 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, options_enabled);
1141 1141
1142 command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui); 1142 command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui);
1143 command_updater_.UpdateCommandEnabled(IDC_VIEW_PASSWORDS, show_main_ui); 1143 command_updater_.UpdateCommandEnabled(IDC_VIEW_PASSWORDS, show_main_ui);
1144 command_updater_.UpdateCommandEnabled(IDC_ABOUT, show_main_ui); 1144 command_updater_.UpdateCommandEnabled(IDC_ABOUT, show_main_ui);
1145 command_updater_.UpdateCommandEnabled(IDC_SHOW_APP_MENU, show_main_ui); 1145 command_updater_.UpdateCommandEnabled(IDC_SHOW_APP_MENU, show_main_ui);
1146 #if defined (ENABLE_PROFILING) && !defined(NO_TCMALLOC) 1146 #if defined (ENABLE_PROFILING) && !defined(NO_TCMALLOC)
1147 command_updater_.UpdateCommandEnabled(IDC_PROFILING_ENABLED, show_main_ui); 1147 command_updater_.UpdateCommandEnabled(IDC_PROFILING_ENABLED, show_main_ui);
1148 #endif 1148 #endif
1149 1149
1150 // Disable explicit fullscreen toggling for app-panels and when in metro snap 1150 // Disable explicit fullscreen toggling when in metro snap mode.
1151 // mode. 1151 bool fullscreen_enabled = fullscreen_mode != FULLSCREEN_METRO_SNAP;
1152 bool fullscreen_enabled =
1153 !(browser_->is_type_panel() && browser_->is_app()) &&
1154 fullscreen_mode != FULLSCREEN_METRO_SNAP;
1155 #if defined(OS_MACOSX) 1152 #if defined(OS_MACOSX)
1156 // The Mac implementation doesn't support switching to fullscreen while 1153 // The Mac implementation doesn't support switching to fullscreen while
1157 // a tab modal dialog is displayed. 1154 // a tab modal dialog is displayed.
1158 int tab_index = chrome::IndexOfFirstBlockedTab(browser_->tab_strip_model()); 1155 int tab_index = chrome::IndexOfFirstBlockedTab(browser_->tab_strip_model());
1159 bool has_blocked_tab = tab_index != browser_->tab_strip_model()->count(); 1156 bool has_blocked_tab = tab_index != browser_->tab_strip_model()->count();
1160 fullscreen_enabled &= !has_blocked_tab; 1157 fullscreen_enabled &= !has_blocked_tab;
1161 #endif 1158 #endif
1162 1159
1163 command_updater_.UpdateCommandEnabled(IDC_FULLSCREEN, fullscreen_enabled); 1160 command_updater_.UpdateCommandEnabled(IDC_FULLSCREEN, fullscreen_enabled);
1164 command_updater_.UpdateCommandEnabled(IDC_PRESENTATION_MODE, 1161 command_updater_.UpdateCommandEnabled(IDC_PRESENTATION_MODE,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 1248
1252 BrowserWindow* BrowserCommandController::window() { 1249 BrowserWindow* BrowserCommandController::window() {
1253 return browser_->window(); 1250 return browser_->window();
1254 } 1251 }
1255 1252
1256 Profile* BrowserCommandController::profile() { 1253 Profile* BrowserCommandController::profile() {
1257 return browser_->profile(); 1254 return browser_->profile();
1258 } 1255 }
1259 1256
1260 } // namespace chrome 1257 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_command_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698