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

Unified Diff: headless/lib/headless_content_main_delegate.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/headless_content_main_delegate.cc
diff --git a/headless/lib/headless_content_main_delegate.cc b/headless/lib/headless_content_main_delegate.cc
index 367d74ccd314c500bd29c55fe269b7b593eadb4d..067ef27193dd9feb922c84c636bb7d6393778e3e 100644
--- a/headless/lib/headless_content_main_delegate.cc
+++ b/headless/lib/headless_content_main_delegate.cc
@@ -4,6 +4,8 @@
#include "headless/lib/headless_content_main_delegate.h"
+#include <utility>
+
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/environment.h"
@@ -20,6 +22,7 @@
#include "headless/lib/browser/headless_content_browser_client.h"
#include "headless/lib/headless_crash_reporter_client.h"
#include "headless/lib/headless_macros.h"
+#include "headless/lib/renderer/headless_content_renderer_client.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/switches.h"
@@ -269,8 +272,15 @@ void HeadlessContentMainDelegate::InitializeResourceBundle() {
content::ContentBrowserClient*
HeadlessContentMainDelegate::CreateContentBrowserClient() {
- browser_client_.reset(new HeadlessContentBrowserClient(browser_.get()));
+ browser_client_ =
+ base::MakeUnique<HeadlessContentBrowserClient>(browser_.get());
return browser_client_.get();
}
+content::ContentRendererClient*
+HeadlessContentMainDelegate::CreateContentRendererClient() {
+ renderer_client_ = base::MakeUnique<HeadlessContentRendererClient>();
+ return renderer_client_.get();
+}
+
} // namespace headless

Powered by Google App Engine
This is Rietveld 408576698