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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 2376193006: Disable Ctrl+Shift+P on Chrome OS (Closed)
Patch Set: Fix test. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 4befbb55369bb0e277bf27f0d834506c914958a6..343ef90e5ea2889e3416937ad1d95c97b9330094 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -252,7 +252,7 @@ bool IsShowingWebContentsModalDialog(Browser* browser) {
return manager && manager->IsDialogActive();
}
-#if defined(ENABLE_BASIC_PRINTING)
+#if defined(ENABLE_BASIC_PRINTING) && !defined(OS_CHROMEOS)
bool PrintPreviewShowing(const Browser* browser) {
#if defined(ENABLE_PRINT_PREVIEW)
WebContents* contents = browser->tab_strip_model()->GetActiveWebContents();
@@ -264,7 +264,7 @@ bool PrintPreviewShowing(const Browser* browser) {
return false;
#endif
}
-#endif // ENABLE_BASIC_PRINTING
+#endif // ENABLE_BASIC_PRINTING && !OS_CHROMEOS
Lei Zhang 2016/10/03 23:03:58 While we are here, can you change this to: #endif
skau 2016/10/03 23:32:13 Done.
} // namespace
@@ -901,10 +901,14 @@ void BasicPrint(Browser* browser) {
}
bool CanBasicPrint(Browser* browser) {
+#if defined(OS_CHROMEOS)
+ return false; // ChromeOS does not use the system print dialog.
+#else
// If printing is not disabled via pref or policy, it is always possible to
// advanced print when the print preview is visible.
return browser->profile()->GetPrefs()->GetBoolean(prefs::kPrintingEnabled) &&
(PrintPreviewShowing(browser) || CanPrint(browser));
+#endif // OS_CHROMEOS
Lei Zhang 2016/10/03 23:03:58 Ditto.
skau 2016/10/03 23:32:13 Done.
}
#endif // ENABLE_BASIC_PRINTING

Powered by Google App Engine
This is Rietveld 408576698