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

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

Issue 522493002: Removed Ctrl+Shift+P shortcut for system dialog printing on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Thu Aug 28 21:07:58 PDT 2014 Created 6 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
« no previous file with comments | « chrome/app/chrome_dll.rc ('k') | chrome/browser/ui/views/accelerator_table.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/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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 break; 535 break;
536 case IDC_VIEW_SOURCE: 536 case IDC_VIEW_SOURCE:
537 ViewSelectedSource(browser_); 537 ViewSelectedSource(browser_);
538 break; 538 break;
539 case IDC_EMAIL_PAGE_LOCATION: 539 case IDC_EMAIL_PAGE_LOCATION:
540 EmailPageLocation(browser_); 540 EmailPageLocation(browser_);
541 break; 541 break;
542 case IDC_PRINT: 542 case IDC_PRINT:
543 Print(browser_); 543 Print(browser_);
544 break; 544 break;
545 #if !defined(OS_WIN)
545 case IDC_ADVANCED_PRINT: 546 case IDC_ADVANCED_PRINT:
546 content::RecordAction(base::UserMetricsAction("Accel_Advanced_Print")); 547 content::RecordAction(base::UserMetricsAction("Accel_Advanced_Print"));
547 AdvancedPrint(browser_); 548 AdvancedPrint(browser_);
548 break; 549 break;
550 #endif // OS_WIN
549 case IDC_PRINT_TO_DESTINATION: 551 case IDC_PRINT_TO_DESTINATION:
550 PrintToDestination(browser_); 552 PrintToDestination(browser_);
551 break; 553 break;
552 case IDC_TRANSLATE_PAGE: 554 case IDC_TRANSLATE_PAGE:
553 Translate(browser_); 555 Translate(browser_);
554 break; 556 break;
555 case IDC_MANAGE_PASSWORDS_FOR_PAGE: 557 case IDC_MANAGE_PASSWORDS_FOR_PAGE:
556 ManagePasswordsForPage(browser_); 558 ManagePasswordsForPage(browser_);
557 break; 559 break;
558 560
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 command_updater_.UpdateCommandEnabled(IDC_FULLSCREEN, fullscreen_enabled); 1268 command_updater_.UpdateCommandEnabled(IDC_FULLSCREEN, fullscreen_enabled);
1267 command_updater_.UpdateCommandEnabled(IDC_PRESENTATION_MODE, 1269 command_updater_.UpdateCommandEnabled(IDC_PRESENTATION_MODE,
1268 fullscreen_enabled); 1270 fullscreen_enabled);
1269 1271
1270 UpdateCommandsForBookmarkBar(); 1272 UpdateCommandsForBookmarkBar();
1271 } 1273 }
1272 1274
1273 void BrowserCommandController::UpdatePrintingState() { 1275 void BrowserCommandController::UpdatePrintingState() {
1274 bool print_enabled = CanPrint(browser_); 1276 bool print_enabled = CanPrint(browser_);
1275 command_updater_.UpdateCommandEnabled(IDC_PRINT, print_enabled); 1277 command_updater_.UpdateCommandEnabled(IDC_PRINT, print_enabled);
1278 #if !defined(OS_WIN)
1276 command_updater_.UpdateCommandEnabled(IDC_ADVANCED_PRINT, 1279 command_updater_.UpdateCommandEnabled(IDC_ADVANCED_PRINT,
1277 CanAdvancedPrint(browser_)); 1280 CanAdvancedPrint(browser_));
Lei Zhang 2014/08/29 04:30:41 Also ifdef out CanAdvancedPrint() and AdvancedPrin
Vitaly Buka (NO REVIEWS) 2014/08/29 08:06:23 Done.
1281 #endif
1278 command_updater_.UpdateCommandEnabled(IDC_PRINT_TO_DESTINATION, 1282 command_updater_.UpdateCommandEnabled(IDC_PRINT_TO_DESTINATION,
1279 print_enabled); 1283 print_enabled);
1280 #if defined(OS_WIN) 1284 #if defined(OS_WIN)
1281 HMODULE metro_module = base::win::GetMetroModule(); 1285 HMODULE metro_module = base::win::GetMetroModule();
1282 if (metro_module != NULL) { 1286 if (metro_module != NULL) {
1283 typedef void (*MetroEnablePrinting)(BOOL); 1287 typedef void (*MetroEnablePrinting)(BOOL);
1284 MetroEnablePrinting metro_enable_printing = 1288 MetroEnablePrinting metro_enable_printing =
1285 reinterpret_cast<MetroEnablePrinting>( 1289 reinterpret_cast<MetroEnablePrinting>(
1286 ::GetProcAddress(metro_module, "MetroEnablePrinting")); 1290 ::GetProcAddress(metro_module, "MetroEnablePrinting"));
1287 if (metro_enable_printing) 1291 if (metro_enable_printing)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 1360
1357 BrowserWindow* BrowserCommandController::window() { 1361 BrowserWindow* BrowserCommandController::window() {
1358 return browser_->window(); 1362 return browser_->window();
1359 } 1363 }
1360 1364
1361 Profile* BrowserCommandController::profile() { 1365 Profile* BrowserCommandController::profile() {
1362 return browser_->profile(); 1366 return browser_->profile();
1363 } 1367 }
1364 1368
1365 } // namespace chrome 1369 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll.rc ('k') | chrome/browser/ui/views/accelerator_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698