Index: chrome/browser/printing/print_view_manager_common.cc |
diff --git a/chrome/browser/printing/print_view_manager_common.cc b/chrome/browser/printing/print_view_manager_common.cc |
index 097220415f1ea81bec36122b1a23d4437c74e5eb..b4b3603a2b69e6397e70ff58d5ddbc0c45dab8b9 100644 |
--- a/chrome/browser/printing/print_view_manager_common.cc |
+++ b/chrome/browser/printing/print_view_manager_common.cc |
@@ -4,16 +4,18 @@ |
#include "chrome/browser/printing/print_view_manager_common.h" |
+#include "printing/features/features.h" |
+ |
#if defined(ENABLE_EXTENSIONS) |
#include "components/guest_view/browser/guest_view_manager.h" |
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h" |
#endif // defined(ENABLE_EXTENSIONS) |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
#include "chrome/browser/printing/print_view_manager.h" |
#else |
#include "chrome/browser/printing/print_view_manager_basic.h" |
-#endif // defined(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
namespace printing { |
namespace { |
@@ -53,31 +55,31 @@ content::WebContents* GetWebContentsToUse(content::WebContents* contents) { |
void StartPrint(content::WebContents* contents, |
bool print_preview_disabled, |
bool selection_only) { |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
using PrintViewManagerImpl = PrintViewManager; |
#else |
using PrintViewManagerImpl = PrintViewManagerBasic; |
-#endif // defined(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
auto* print_view_manager = |
PrintViewManagerImpl::FromWebContents(GetWebContentsToUse(contents)); |
if (!print_view_manager) |
return; |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
if (!print_preview_disabled) { |
print_view_manager->PrintPreviewNow(selection_only); |
return; |
} |
#endif // ENABLE_PRINT_PREVIEW |
-#if defined(ENABLE_BASIC_PRINTING) |
+#if BUILDFLAG(ENABLE_BASIC_PRINTING) |
print_view_manager->PrintNow(); |
#endif // ENABLE_BASIC_PRINTING |
} |
-#if defined(ENABLE_BASIC_PRINTING) |
+#if BUILDFLAG(ENABLE_BASIC_PRINTING) |
void StartBasicPrint(content::WebContents* contents) { |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
PrintViewManager* print_view_manager = |
PrintViewManager::FromWebContents(GetWebContentsToUse(contents)); |
if (!print_view_manager) |