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

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

Issue 2458833005: Move printing defines to buildflag system. (Closed)
Patch Set: Missing file 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/tab_helpers.cc
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
index c0a11c615bc1a39f1e203b511a034de2e798fa5b..f10d1b08170de16a68a8a69ed03d910f6b7668f8 100644
--- a/chrome/browser/ui/tab_helpers.cc
+++ b/chrome/browser/ui/tab_helpers.cc
@@ -59,6 +59,7 @@
#include "components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h"
#include "components/tracing/common/tracing_switches.h"
#include "content/public/browser/web_contents.h"
+#include "printing/features/features.h"
#if BUILDFLAG(ANDROID_JAVA_UI)
#include "chrome/browser/android/banners/app_banner_manager_android.h"
@@ -101,14 +102,14 @@
#include "chrome/browser/supervised_user/supervised_user_navigation_observer.h"
#endif
-#if defined(ENABLE_PRINTING)
-#if defined(ENABLE_PRINT_PREVIEW)
+#if BUILDFLAG(ENABLE_PRINTING)
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
#include "chrome/browser/printing/print_preview_message_handler.h"
#include "chrome/browser/printing/print_view_manager.h"
#else
#include "chrome/browser/printing/print_view_manager_basic.h"
-#endif // defined(ENABLE_PRINT_PREVIEW)
-#endif // defined(ENABLE_PRINTING)
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
+#endif // BUILDFLAG(ENABLE_PRINTING)
using content::WebContents;
@@ -251,14 +252,14 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
SupervisedUserNavigationObserver::CreateForWebContents(web_contents);
#endif
-#if defined(ENABLE_PRINTING) && !BUILDFLAG(ANDROID_JAVA_UI)
-#if defined(ENABLE_PRINT_PREVIEW)
+#if BUILDFLAG(ENABLE_PRINTING) && !BUILDFLAG(ANDROID_JAVA_UI)
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
printing::PrintViewManager::CreateForWebContents(web_contents);
printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
#else
printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
-#endif // defined(ENABLE_PRINT_PREVIEW)
-#endif // defined(ENABLE_PRINTING) && !BUILDFLAG(ANDROID_JAVA_UI)
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
+#endif // BUILDFLAG(ENABLE_PRINTING) && !BUILDFLAG(ANDROID_JAVA_UI)
bool enabled_distiller = base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableDomDistiller);

Powered by Google App Engine
This is Rietveld 408576698