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

Side by Side Diff: headless/lib/browser/headless_web_contents_impl.cc

Issue 2920013002: Use pdf compositor service for printing when OOPIF is enabled
Patch Set: rebase Created 3 years, 2 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 unified diff | Download patch
« no previous file with comments | « components/printing/browser/print_manager_utils.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "headless/lib/browser/headless_web_contents_impl.h" 5 #include "headless/lib/browser/headless_web_contents_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 : content::WebContentsObserver(web_contents), 276 : content::WebContentsObserver(web_contents),
277 web_contents_delegate_(new HeadlessWebContentsImpl::Delegate(this)), 277 web_contents_delegate_(new HeadlessWebContentsImpl::Delegate(this)),
278 web_contents_(web_contents), 278 web_contents_(web_contents),
279 agent_host_(content::DevToolsAgentHost::GetOrCreateFor(web_contents)), 279 agent_host_(content::DevToolsAgentHost::GetOrCreateFor(web_contents)),
280 inject_mojo_services_into_isolated_world_(false), 280 inject_mojo_services_into_isolated_world_(false),
281 browser_context_(browser_context), 281 browser_context_(browser_context),
282 render_process_host_(web_contents->GetMainFrame()->GetProcess()), 282 render_process_host_(web_contents->GetMainFrame()->GetProcess()),
283 weak_ptr_factory_(this) { 283 weak_ptr_factory_(this) {
284 #if BUILDFLAG(ENABLE_BASIC_PRINTING) && !defined(CHROME_MULTIPLE_DLL_CHILD) 284 #if BUILDFLAG(ENABLE_BASIC_PRINTING) && !defined(CHROME_MULTIPLE_DLL_CHILD)
285 HeadlessPrintManager::CreateForWebContents(web_contents); 285 HeadlessPrintManager::CreateForWebContents(web_contents);
286 // TODO(weili): Add support for printing OOPIFs.
286 #endif 287 #endif
287 web_contents->GetMutableRendererPrefs()->accept_languages = 288 web_contents->GetMutableRendererPrefs()->accept_languages =
288 browser_context->options()->accept_language(); 289 browser_context->options()->accept_language();
289 web_contents_->SetDelegate(web_contents_delegate_.get()); 290 web_contents_->SetDelegate(web_contents_delegate_.get());
290 render_process_host_->AddObserver(this); 291 render_process_host_->AddObserver(this);
291 agent_host_->AddObserver(this); 292 agent_host_->AddObserver(this);
292 } 293 }
293 294
294 HeadlessWebContentsImpl::~HeadlessWebContentsImpl() { 295 HeadlessWebContentsImpl::~HeadlessWebContentsImpl() {
295 agent_host_->RemoveObserver(this); 296 agent_host_->RemoveObserver(this);
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 const MojoService& other) = default; 505 const MojoService& other) = default;
505 506
506 HeadlessWebContents::Builder::MojoService::MojoService( 507 HeadlessWebContents::Builder::MojoService::MojoService(
507 const std::string& service_name, 508 const std::string& service_name,
508 const ServiceFactoryCallback& service_factory) 509 const ServiceFactoryCallback& service_factory)
509 : service_name(service_name), service_factory(service_factory) {} 510 : service_name(service_name), service_factory(service_factory) {}
510 511
511 HeadlessWebContents::Builder::MojoService::~MojoService() {} 512 HeadlessWebContents::Builder::MojoService::~MojoService() {}
512 513
513 } // namespace headless 514 } // namespace headless
OLDNEW
« no previous file with comments | « components/printing/browser/print_manager_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698