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

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

Issue 2780433002: add print to pdf for headless (Closed)
Patch Set: improve comments as suggested 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
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 64ded56f90cbbe87b01bf45ad88de00f067b18e6..720cec892c2744522d9a28ce232d6f7e3e5bdbaa 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -6,6 +6,7 @@
#include <string>
#include <utility>
+#include <vector>
#include "base/bind.h"
#include "base/json/json_writer.h"
@@ -30,6 +31,7 @@
#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 "services/service_manager/public/cpp/interface_registry.h"
namespace headless {
@@ -172,6 +174,7 @@ HeadlessWebContentsImpl::HeadlessWebContentsImpl(
agent_host_(content::DevToolsAgentHost::GetOrCreateFor(web_contents)),
browser_context_(browser_context),
render_process_host_(web_contents->GetRenderProcessHost()) {
+ printing::HeadlessPrintManager::CreateForWebContents(web_contents);
web_contents_->SetDelegate(web_contents_delegate_.get());
render_process_host_->AddObserver(this);
}

Powered by Google App Engine
This is Rietveld 408576698