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

Unified Diff: headless/lib/browser/headless_web_contents_impl.cc

Issue 2808653002: make headless lib complie when enable_basic_printing is set to false (Closed)
Patch Set: minor fix Created 3 years, 8 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
« no previous file with comments | « headless/lib/browser/headless_devtools_manager_delegate.cc ('k') | headless/lib/renderer/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/browser/headless_web_contents_impl.cc
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index 720cec892c2744522d9a28ce232d6f7e3e5bdbaa..a967c3c0f9bbd69a55b133e0ef6b1af9ea8f412c 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -31,9 +31,13 @@
#include "headless/lib/browser/headless_browser_impl.h"
#include "headless/lib/browser/headless_browser_main_parts.h"
#include "headless/lib/browser/headless_devtools_client_impl.h"
-#include "headless/lib/browser/headless_print_manager.h"
+#include "printing/features/features.h"
#include "services/service_manager/public/cpp/interface_registry.h"
+#if BUILDFLAG(ENABLE_BASIC_PRINTING)
+#include "headless/lib/browser/headless_print_manager.h"
+#endif
+
namespace headless {
// static
@@ -174,7 +178,9 @@ HeadlessWebContentsImpl::HeadlessWebContentsImpl(
agent_host_(content::DevToolsAgentHost::GetOrCreateFor(web_contents)),
browser_context_(browser_context),
render_process_host_(web_contents->GetRenderProcessHost()) {
+#if BUILDFLAG(ENABLE_BASIC_PRINTING)
printing::HeadlessPrintManager::CreateForWebContents(web_contents);
+#endif
web_contents_->SetDelegate(web_contents_delegate_.get());
render_process_host_->AddObserver(this);
}
« no previous file with comments | « headless/lib/browser/headless_devtools_manager_delegate.cc ('k') | headless/lib/renderer/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698