Index: chrome/browser/renderer_context_menu/render_view_context_menu.cc |
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
index 3887bf9e614b8a1c2c23767d8dd0d26789c8b51b..b8c4267dde9ccdee0edd7824b44738fda7bb1667 100644 |
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
@@ -105,6 +105,7 @@ |
#include "content/public/common/menu_item.h" |
#include "content/public/common/url_utils.h" |
#include "net/base/escape.h" |
+#include "printing/features/features.h" |
#include "third_party/WebKit/public/public_features.h" |
#include "third_party/WebKit/public/web/WebContextMenuData.h" |
#include "third_party/WebKit/public/web/WebMediaPlayerAction.h" |
@@ -134,15 +135,15 @@ |
#include "extensions/common/extension.h" |
#endif |
-#if defined(ENABLE_PRINTING) |
+#if BUILDFLAG(ENABLE_PRINTING) |
#include "chrome/browser/printing/print_view_manager_common.h" |
#include "components/printing/common/print_messages.h" |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
#include "chrome/browser/printing/print_preview_context_menu_observer.h" |
#include "chrome/browser/printing/print_preview_dialog_controller.h" |
-#endif // defined(ENABLE_PRINT_PREVIEW) |
-#endif // defined(ENABLE_PRINTING) |
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_PRINTING) |
#if defined(ENABLE_MEDIA_ROUTER) |
#include "chrome/browser/media/router/media_router_dialog_controller.h" |
@@ -915,7 +916,7 @@ void RenderViewContextMenu::HandleAuthorizeAllPlugins() { |
#endif |
void RenderViewContextMenu::AppendPrintPreviewItems() { |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
if (!print_preview_menu_observer_.get()) { |
print_preview_menu_observer_.reset( |
new PrintPreviewContextMenuObserver(source_web_contents_)); |
@@ -2080,7 +2081,7 @@ bool RenderViewContextMenu::IsSaveAsEnabled() const { |
bool can_save = |
(params_.media_flags & WebContextMenuData::MediaCanSave) && |
url.is_valid() && ProfileIOData::IsHandledProtocol(url.scheme()); |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// Do not save the preview PDF on the print preview page. |
can_save = can_save && |
!(printing::PrintPreviewDialogController::IsPrintPreviewURL(url)); |
@@ -2403,7 +2404,7 @@ void RenderViewContextMenu::ExecRestartPackagedApp() { |
} |
void RenderViewContextMenu::ExecPrint() { |
-#if defined(ENABLE_PRINTING) |
+#if BUILDFLAG(ENABLE_PRINTING) |
if (params_.media_type != WebContextMenuData::MediaTypeNone) { |
RenderFrameHost* render_frame_host = GetRenderFrameHost(); |
if (render_frame_host) { |
@@ -2417,7 +2418,7 @@ void RenderViewContextMenu::ExecPrint() { |
source_web_contents_, |
GetPrefs(browser_context_)->GetBoolean(prefs::kPrintPreviewDisabled), |
!params_.selection_text.empty()); |
-#endif // defined(ENABLE_PRINTING) |
+#endif // BUILDFLAG(ENABLE_PRINTING) |
} |
void RenderViewContextMenu::ExecRouteMedia() { |