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

Unified Diff: chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc

Issue 2479593006: Move enable extensions define to a build flag. (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
« no previous file with comments | « chrome/renderer/pepper/pepper_uma_host.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc
diff --git a/chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc b/chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc
index d20b8aafc887f834fdbe540318ef29f1f39eda0d..07b03dc6f15a25eae72e0d20e877edf1430ede6a 100644
--- a/chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc
+++ b/chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc
@@ -14,16 +14,17 @@
#include "chrome/renderer/prerender/prerender_helper.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
+#include "extensions/features/features.h"
#include "ipc/ipc_message.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/common/extensions/extension_constants.h"
#include "extensions/common/constants.h"
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h"
-#endif // defined(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
ChromePrintWebViewHelperDelegate::~ChromePrintWebViewHelperDelegate(){
}
@@ -41,7 +42,7 @@ bool ChromePrintWebViewHelperDelegate::CancelPrerender(
// Return the PDF object element if |frame| is the out of process PDF extension.
blink::WebElement ChromePrintWebViewHelperDelegate::GetPdfElement(
blink::WebLocalFrame* frame) {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
GURL url = frame->document().url();
bool inside_print_preview = url.GetOrigin() == chrome::kChromeUIPrintURL;
bool inside_pdf_extension = url.SchemeIs(extensions::kExtensionScheme) &&
@@ -55,7 +56,7 @@ blink::WebElement ChromePrintWebViewHelperDelegate::GetPdfElement(
}
NOTREACHED();
}
-#endif // defined(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
return blink::WebElement();
}
@@ -66,7 +67,7 @@ bool ChromePrintWebViewHelperDelegate::IsPrintPreviewEnabled() {
bool ChromePrintWebViewHelperDelegate::OverridePrint(
blink::WebLocalFrame* frame) {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
if (!frame->document().isPluginDocument())
return false;
@@ -83,6 +84,6 @@ bool ChromePrintWebViewHelperDelegate::OverridePrint(
mime_handlers.front()->PostMessageFromValue(message);
return true;
}
-#endif // defined(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
return false;
}
« no previous file with comments | « chrome/renderer/pepper/pepper_uma_host.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698