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

Unified Diff: headless/lib/renderer/headless_content_renderer_client.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/renderer/headless_content_renderer_client.cc
diff --git a/headless/lib/renderer/headless_content_renderer_client.cc b/headless/lib/renderer/headless_content_renderer_client.cc
new file mode 100644
index 0000000000000000000000000000000000000000..52e40774b049f6d362363e26e8ba26ff20e83a82
--- /dev/null
+++ b/headless/lib/renderer/headless_content_renderer_client.cc
@@ -0,0 +1,23 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "headless/lib/renderer/headless_content_renderer_client.h"
+
+#include "base/memory/ptr_util.h"
+#include "components/printing/renderer/print_web_view_helper.h"
+#include "headless/lib/renderer/headless_print_web_view_helper_delegate.h"
+
+namespace headless {
+
+HeadlessContentRendererClient::HeadlessContentRendererClient() {}
+
+HeadlessContentRendererClient::~HeadlessContentRendererClient() {}
+
+void HeadlessContentRendererClient::RenderFrameCreated(
+ content::RenderFrame* render_frame) {
+ new printing::PrintWebViewHelper(
+ render_frame, base::MakeUnique<HeadlessPrintWebViewHelperDelegate>());
+}
+
+} // namespace headless

Powered by Google App Engine
This is Rietveld 408576698