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

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 2458833005: Move printing defines to buildflag system. (Closed)
Patch Set: Merge Created 4 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/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() {
« no previous file with comments | « chrome/browser/renderer_context_menu/render_view_context_menu.h ('k') | chrome/browser/task_manager/web_contents_tags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698