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

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

Issue 1886463003: Remove the Presentation Mode Command ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed some 10.6 logic Created 4 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
« no previous file with comments | « chrome/app/nibs/MainMenu.xib ('k') | chrome/browser/ui/cocoa/accelerators_cocoa.mm » ('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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 413 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
414 case IDC_USE_SYSTEM_TITLE_BAR: { 414 case IDC_USE_SYSTEM_TITLE_BAR: {
415 PrefService* prefs = browser_->profile()->GetPrefs(); 415 PrefService* prefs = browser_->profile()->GetPrefs();
416 prefs->SetBoolean(prefs::kUseCustomChromeFrame, 416 prefs->SetBoolean(prefs::kUseCustomChromeFrame,
417 !prefs->GetBoolean(prefs::kUseCustomChromeFrame)); 417 !prefs->GetBoolean(prefs::kUseCustomChromeFrame));
418 break; 418 break;
419 } 419 }
420 #endif 420 #endif
421 421
422 #if defined(OS_MACOSX) 422 #if defined(OS_MACOSX)
423 case IDC_PRESENTATION_MODE:
424 chrome::ToggleFullscreenMode(browser_);
425 break;
426 case IDC_TOGGLE_FULLSCREEN_TOOLBAR: 423 case IDC_TOGGLE_FULLSCREEN_TOOLBAR:
427 chrome::ToggleFullscreenToolbar(browser_); 424 chrome::ToggleFullscreenToolbar(browser_);
428 break; 425 break;
429 #endif 426 #endif
430 case IDC_EXIT: 427 case IDC_EXIT:
431 Exit(); 428 Exit();
432 break; 429 break;
433 430
434 // Page-related commands 431 // Page-related commands
435 case IDC_SAVE_PAGE: 432 case IDC_SAVE_PAGE:
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 bool fullscreen_enabled = true; 1158 bool fullscreen_enabled = true;
1162 #if !defined(OS_MACOSX) 1159 #if !defined(OS_MACOSX)
1163 if (window_state == WINDOW_STATE_NOT_FULLSCREEN && 1160 if (window_state == WINDOW_STATE_NOT_FULLSCREEN &&
1164 !profile()->GetPrefs()->GetBoolean(prefs::kFullscreenAllowed)) { 1161 !profile()->GetPrefs()->GetBoolean(prefs::kFullscreenAllowed)) {
1165 // Disable toggling into fullscreen mode if disallowed by pref. 1162 // Disable toggling into fullscreen mode if disallowed by pref.
1166 fullscreen_enabled = false; 1163 fullscreen_enabled = false;
1167 } 1164 }
1168 #endif 1165 #endif
1169 1166
1170 command_updater_.UpdateCommandEnabled(IDC_FULLSCREEN, fullscreen_enabled); 1167 command_updater_.UpdateCommandEnabled(IDC_FULLSCREEN, fullscreen_enabled);
1171 command_updater_.UpdateCommandEnabled(IDC_PRESENTATION_MODE,
1172 fullscreen_enabled);
1173 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_FULLSCREEN_TOOLBAR, 1168 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_FULLSCREEN_TOOLBAR,
1174 fullscreen_enabled); 1169 fullscreen_enabled);
1175 1170
1176 UpdateCommandsForBookmarkBar(); 1171 UpdateCommandsForBookmarkBar();
1177 } 1172 }
1178 1173
1179 void BrowserCommandController::UpdatePrintingState() { 1174 void BrowserCommandController::UpdatePrintingState() {
1180 bool print_enabled = CanPrint(browser_); 1175 bool print_enabled = CanPrint(browser_);
1181 command_updater_.UpdateCommandEnabled(IDC_PRINT, print_enabled); 1176 command_updater_.UpdateCommandEnabled(IDC_PRINT, print_enabled);
1182 #if defined(ENABLE_BASIC_PRINTING) 1177 #if defined(ENABLE_BASIC_PRINTING)
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 1251
1257 BrowserWindow* BrowserCommandController::window() { 1252 BrowserWindow* BrowserCommandController::window() {
1258 return browser_->window(); 1253 return browser_->window();
1259 } 1254 }
1260 1255
1261 Profile* BrowserCommandController::profile() { 1256 Profile* BrowserCommandController::profile() {
1262 return browser_->profile(); 1257 return browser_->profile();
1263 } 1258 }
1264 1259
1265 } // namespace chrome 1260 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/app/nibs/MainMenu.xib ('k') | chrome/browser/ui/cocoa/accelerators_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698