Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix build with enable_printing=false #27456

Merged
merged 1 commit into from
Jan 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions shell/browser/api/electron_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,9 @@ WebContents::WebContents(v8::Isolate* isolate,
devtools_file_system_indexer_(new DevToolsFileSystemIndexer),
file_task_runner_(
base::ThreadPool::CreateSequencedTaskRunner({base::MayBlock()})),
#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.
Expand Down Expand Up @@ -652,7 +654,9 @@ WebContents::WebContents(v8::Isolate* isolate,
devtools_file_system_indexer_(new DevToolsFileSystemIndexer),
file_task_runner_(
base::ThreadPool::CreateSequencedTaskRunner({base::MayBlock()})),
#if BUILDFLAG(ENABLE_PRINTING)
print_task_runner_(CreatePrinterHandlerTaskRunner()),
#endif
weak_factory_(this) {
DCHECK(type != Type::kRemote)
<< "Can't take ownership of a remote WebContents";
Expand All @@ -668,7 +672,9 @@ WebContents::WebContents(v8::Isolate* isolate,
devtools_file_system_indexer_(new DevToolsFileSystemIndexer),
file_task_runner_(
base::ThreadPool::CreateSequencedTaskRunner({base::MayBlock()})),
#if BUILDFLAG(ENABLE_PRINTING)
print_task_runner_(CreatePrinterHandlerTaskRunner()),
#endif
weak_factory_(this) {
// Read options.
options.Get("backgroundThrottling", &background_throttling_);
Expand Down
3 changes: 3 additions & 0 deletions shell/browser/api/electron_api_web_contents.h
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,10 @@ class WebContents : public gin::Wrappable<WebContents>,
DevToolsIndexingJobsMap devtools_indexing_jobs_;

scoped_refptr<base::SequencedTaskRunner> file_task_runner_;

#if BUILDFLAG(ENABLE_PRINTING)
scoped_refptr<base::TaskRunner> print_task_runner_;
#endif

// Stores the frame thats currently in fullscreen, nullptr if there is none.
content::RenderFrameHost* fullscreen_frame_ = nullptr;
Expand Down