|
@@ -452,7 +452,9 @@ WebContents::WebContents(v8::Isolate* isolate,
|
|
|
content::WebContents* web_contents)
|
|
|
: content::WebContentsObserver(web_contents),
|
|
|
type_(Type::REMOTE),
|
|
|
+#if BUILDFLAG(ENABLE_PRINTING)
|
|
|
print_task_runner_(CreatePrinterHandlerTaskRunner()),
|
|
|
+#endif
|
|
|
weak_factory_(this) {
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
// WebContents created by extension host will have valid ViewType set.
|
|
@@ -487,7 +489,9 @@ WebContents::WebContents(v8::Isolate* isolate,
|
|
|
Type type)
|
|
|
: content::WebContentsObserver(web_contents.get()),
|
|
|
type_(type),
|
|
|
+#if BUILDFLAG(ENABLE_PRINTING)
|
|
|
print_task_runner_(CreatePrinterHandlerTaskRunner()),
|
|
|
+#endif
|
|
|
weak_factory_(this) {
|
|
|
DCHECK(type != Type::REMOTE)
|
|
|
<< "Can't take ownership of a remote WebContents";
|
|
@@ -499,7 +503,10 @@ WebContents::WebContents(v8::Isolate* isolate,
|
|
|
|
|
|
WebContents::WebContents(v8::Isolate* isolate,
|
|
|
const gin_helper::Dictionary& options)
|
|
|
- : print_task_runner_(CreatePrinterHandlerTaskRunner()),
|
|
|
+ :
|
|
|
+#if BUILDFLAG(ENABLE_PRINTING)
|
|
|
+ print_task_runner_(CreatePrinterHandlerTaskRunner()),
|
|
|
+#endif
|
|
|
weak_factory_(this) {
|
|
|
// Read options.
|
|
|
options.Get("backgroundThrottling", &background_throttling_);
|