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

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

Issue 702603004: Renamed DISABLE_BASIC_PRINTING and ENABLE_FULL_PRINTING. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wed Nov 5 02:31:54 PST 2014 Created 6 years, 1 month 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 351396bd7ef6364f160c1a9808c9233ae80ae91c..6da40d7aa5b14d6d66120e814bcc087a0a678c98 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -96,12 +96,12 @@
#endif
#if defined(ENABLE_PRINTING)
-#if defined(ENABLE_FULL_PRINTING)
+#if defined(ENABLE_PRINT_PREVIEW)
#include "chrome/browser/printing/print_preview_dialog_controller.h"
#include "chrome/browser/printing/print_view_manager.h"
#else
#include "chrome/browser/printing/print_view_manager_basic.h"
-#endif // defined(ENABLE_FULL_PRINTING)
+#endif // defined(ENABLE_PRINT_PREVIEW)
#endif // defined(ENABLE_PRINTING)
namespace {
@@ -269,7 +269,7 @@ bool IsShowingWebContentsModalDialog(Browser* browser) {
}
bool PrintPreviewShowing(const Browser* browser) {
-#if defined(ENABLE_FULL_PRINTING)
+#if defined(ENABLE_PRINT_PREVIEW)
WebContents* contents = browser->tab_strip_model()->GetActiveWebContents();
printing::PrintPreviewDialogController* controller =
printing::PrintPreviewDialogController::GetInstance();
@@ -859,7 +859,7 @@ void Print(Browser* browser) {
#if defined(ENABLE_PRINTING)
WebContents* contents = browser->tab_strip_model()->GetActiveWebContents();
-#if defined(ENABLE_FULL_PRINTING)
+#if defined(ENABLE_PRINT_PREVIEW)
printing::PrintViewManager* print_view_manager =
printing::PrintViewManager::FromWebContents(contents);
if (!browser->profile()->GetPrefs()->GetBoolean(
@@ -867,14 +867,14 @@ void Print(Browser* browser) {
print_view_manager->PrintPreviewNow(false);
return;
}
-#else // ENABLE_FULL_PRINTING
+#else // ENABLE_PRINT_PREVIEW
printing::PrintViewManagerBasic* print_view_manager =
printing::PrintViewManagerBasic::FromWebContents(contents);
-#endif // ENABLE_FULL_PRINTING
+#endif // ENABLE_PRINT_PREVIEW
-#if !defined(DISABLE_BASIC_PRINTING)
+#if defined(ENABLE_BASIC_PRINTING)
print_view_manager->PrintNow();
-#endif // DISABLE_BASIC_PRINTING
+#endif // ENABLE_BASIC_PRINTING
#endif // defined(ENABLE_PRINTING)
}
@@ -891,9 +891,9 @@ bool CanPrint(Browser* browser) {
GetContentRestrictions(browser) & CONTENT_RESTRICTION_PRINT);
}
-#if !defined(DISABLE_BASIC_PRINTING)
+#if defined(ENABLE_BASIC_PRINTING)
void BasicPrint(Browser* browser) {
-#if defined(ENABLE_FULL_PRINTING)
+#if defined(ENABLE_PRINT_PREVIEW)
printing::PrintViewManager* print_view_manager =
printing::PrintViewManager::FromWebContents(
browser->tab_strip_model()->GetActiveWebContents());
@@ -914,7 +914,7 @@ bool CanBasicPrint(Browser* browser) {
return browser->profile()->GetPrefs()->GetBoolean(prefs::kPrintingEnabled) &&
(PrintPreviewShowing(browser) || CanPrint(browser));
}
-#endif // !DISABLE_BASIC_PRINTING
+#endif // ENABLE_BASIC_PRINTING
void EmailPageLocation(Browser* browser) {
content::RecordAction(UserMetricsAction("EmailPageLocation"));

Powered by Google App Engine
This is Rietveld 408576698