Commit e80bcd21 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Change some printing methods to take a PrinterQuery.

The methods being modified are PrintJob::Initialize() and
PrintViewManagerBase::CreateNewPrintJob().

Right now they take PrinterQuery's parent class, PrintJobWorkerOwner.
However, in non-test situations, these methods always take a
PrinterQuery. So just make them to take a PrinterQuery. Once that is
done:

- PrintJobWorkerOwner no longer needs a cookie() method. Move that into
  PrinterQuery.
- A test class used for testing PrintJob now derives from PrinterQuery.
  Update the test class to let it continue working.

Change-Id: I6214fa481ac57a017111aa2a6f3e1b00c22d96c6
Reviewed-on: https://chromium-review.googlesource.com/1000965
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550809}
parent 297c3d20
...@@ -51,18 +51,18 @@ PrintJob::~PrintJob() { ...@@ -51,18 +51,18 @@ PrintJob::~PrintJob() {
DCHECK(RunsTasksInCurrentSequence()); DCHECK(RunsTasksInCurrentSequence());
} }
void PrintJob::Initialize(PrintJobWorkerOwner* job, void PrintJob::Initialize(PrinterQuery* query,
const base::string16& name, const base::string16& name,
int page_count) { int page_count) {
DCHECK(!worker_); DCHECK(!worker_);
DCHECK(!is_job_pending_); DCHECK(!is_job_pending_);
DCHECK(!is_canceling_); DCHECK(!is_canceling_);
DCHECK(!document_); DCHECK(!document_);
worker_ = job->DetachWorker(this); worker_ = query->DetachWorker(this);
settings_ = job->settings(); settings_ = query->settings();
auto new_doc = auto new_doc =
base::MakeRefCounted<PrintedDocument>(settings_, name, job->cookie()); base::MakeRefCounted<PrintedDocument>(settings_, name, query->cookie());
new_doc->set_page_count(page_count); new_doc->set_page_count(page_count);
UpdatePrintedDocument(new_doc); UpdatePrintedDocument(new_doc);
...@@ -122,12 +122,6 @@ const PrintSettings& PrintJob::settings() const { ...@@ -122,12 +122,6 @@ const PrintSettings& PrintJob::settings() const {
return settings_; return settings_;
} }
int PrintJob::cookie() const {
// Use an invalid cookie if |document_| does not exist.
// TODO(thestig): Check if this is even reachable.
return document_ ? document_->cookie() : 0;
}
void PrintJob::StartPrinting() { void PrintJob::StartPrinting() {
DCHECK(RunsTasksInCurrentSequence()); DCHECK(RunsTasksInCurrentSequence());
if (!worker_->IsRunning() || is_job_pending_) { if (!worker_->IsRunning() || is_job_pending_) {
......
...@@ -49,9 +49,10 @@ class PrintJob : public PrintJobWorkerOwner, ...@@ -49,9 +49,10 @@ class PrintJob : public PrintJobWorkerOwner,
// post-constructor initialization must be done with Initialize(). // post-constructor initialization must be done with Initialize().
PrintJob(); PrintJob();
// Grabs the ownership of the PrintJobWorker from another job, which is // Grabs the ownership of the PrintJobWorker from a PrinterQuery along with
// usually a PrinterQuery. Set the expected page count of the print job. // the print settings. Sets the expected page count of the print job based on
virtual void Initialize(PrintJobWorkerOwner* job, // the settings.
virtual void Initialize(PrinterQuery* query,
const base::string16& name, const base::string16& name,
int page_count); int page_count);
...@@ -75,7 +76,6 @@ class PrintJob : public PrintJobWorkerOwner, ...@@ -75,7 +76,6 @@ class PrintJob : public PrintJobWorkerOwner,
std::unique_ptr<PrintJobWorker> DetachWorker( std::unique_ptr<PrintJobWorker> DetachWorker(
PrintJobWorkerOwner* new_owner) override; PrintJobWorkerOwner* new_owner) override;
const PrintSettings& settings() const override; const PrintSettings& settings() const override;
int cookie() const override;
// Starts the actual printing. Signals the worker that it should begin to // Starts the actual printing. Signals the worker that it should begin to
// spool as soon as data is available. // spool as soon as data is available.
......
...@@ -22,11 +22,11 @@ PrintQueriesQueue::~PrintQueriesQueue() { ...@@ -22,11 +22,11 @@ PrintQueriesQueue::~PrintQueriesQueue() {
queued_queries_.clear(); queued_queries_.clear();
} }
void PrintQueriesQueue::QueuePrinterQuery(PrinterQuery* job) { void PrintQueriesQueue::QueuePrinterQuery(PrinterQuery* query) {
base::AutoLock lock(lock_); base::AutoLock lock(lock_);
DCHECK(job); DCHECK(query);
queued_queries_.push_back(base::WrapRefCounted(job)); queued_queries_.push_back(base::WrapRefCounted(query));
DCHECK(job->is_valid()); DCHECK(query->is_valid());
} }
scoped_refptr<PrinterQuery> PrintQueriesQueue::PopPrinterQuery( scoped_refptr<PrinterQuery> PrintQueriesQueue::PopPrinterQuery(
......
...@@ -29,7 +29,7 @@ class PrintQueriesQueue : public base::RefCountedThreadSafe<PrintQueriesQueue> { ...@@ -29,7 +29,7 @@ class PrintQueriesQueue : public base::RefCountedThreadSafe<PrintQueriesQueue> {
// Queues a semi-initialized worker thread. Can be called from any thread. // Queues a semi-initialized worker thread. Can be called from any thread.
// Current use case is queuing from the I/O thread. // Current use case is queuing from the I/O thread.
// TODO(maruel): Have them vanish after a timeout (~5 minutes?) // TODO(maruel): Have them vanish after a timeout (~5 minutes?)
void QueuePrinterQuery(PrinterQuery* job); void QueuePrinterQuery(PrinterQuery* query);
// Pops a queued PrintJobWorkerOwner object that was previously queued or // Pops a queued PrintJobWorkerOwner object that was previously queued or
// create new one. Can be called from any thread. // create new one. Can be called from any thread.
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/printing/print_job_worker.h" #include "chrome/browser/printing/print_job_worker.h"
#include "chrome/browser/printing/printer_query.h"
#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_service.h"
#include "content/public/common/child_process_host.h" #include "content/public/common/child_process_host.h"
...@@ -32,17 +33,24 @@ class TestPrintJobWorker : public PrintJobWorker { ...@@ -32,17 +33,24 @@ class TestPrintJobWorker : public PrintJobWorker {
friend class TestOwner; friend class TestOwner;
}; };
class TestOwner : public PrintJobWorkerOwner { class TestOwner : public PrinterQuery {
public: public:
TestOwner() {} TestOwner()
: PrinterQuery(content::ChildProcessHost::kInvalidUniqueID,
content::ChildProcessHost::kInvalidUniqueID) {}
void GetSettingsDone(const PrintSettings& new_settings, void GetSettingsDone(const PrintSettings& new_settings,
PrintingContext::Result result) override { PrintingContext::Result result) override {
EXPECT_FALSE(true); FAIL();
} }
std::unique_ptr<PrintJobWorker> DetachWorker( std::unique_ptr<PrintJobWorker> DetachWorker(
PrintJobWorkerOwner* new_owner) override { PrintJobWorkerOwner* new_owner) override {
{
// Do an actual detach to keep the parent class happy.
auto real_worker = PrinterQuery::DetachWorker(new_owner);
}
// We're screwing up here since we're calling worker from the main thread. // We're screwing up here since we're calling worker from the main thread.
// That's fine for testing. It is actually simulating PrinterQuery behavior. // That's fine for testing. It is actually simulating PrinterQuery behavior.
auto worker = std::make_unique<TestPrintJobWorker>(new_owner); auto worker = std::make_unique<TestPrintJobWorker>(new_owner);
...@@ -54,8 +62,6 @@ class TestOwner : public PrintJobWorkerOwner { ...@@ -54,8 +62,6 @@ class TestOwner : public PrintJobWorkerOwner {
const PrintSettings& settings() const override { return settings_; } const PrintSettings& settings() const override { return settings_; }
int cookie() const override { return 42; }
private: private:
~TestOwner() override {} ~TestOwner() override {}
......
...@@ -39,9 +39,6 @@ class PrintJobWorkerOwner ...@@ -39,9 +39,6 @@ class PrintJobWorkerOwner
// Access the current settings. // Access the current settings.
virtual const PrintSettings& settings() const = 0; virtual const PrintSettings& settings() const = 0;
// Cookie uniquely identifying the PrintedDocument and/or loaded settings.
virtual int cookie() const = 0;
// Returns true if tasks posted to this TaskRunner are sequenced // Returns true if tasks posted to this TaskRunner are sequenced
// with this call. // with this call.
bool RunsTasksInCurrentSequence() const; bool RunsTasksInCurrentSequence() const;
......
...@@ -116,7 +116,7 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) ...@@ -116,7 +116,7 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
inside_inner_message_loop_(false), inside_inner_message_loop_(false),
queue_(g_browser_process->print_job_manager()->queue()), queue_(g_browser_process->print_job_manager()->queue()),
weak_ptr_factory_(this) { weak_ptr_factory_(this) {
DCHECK(queue_.get()); DCHECK(queue_);
Profile* profile = Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext()); Profile::FromBrowserContext(web_contents->GetBrowserContext());
printing_enabled_.Init( printing_enabled_.Init(
...@@ -417,11 +417,11 @@ void PrintViewManagerBase::RenderFrameDeleted( ...@@ -417,11 +417,11 @@ void PrintViewManagerBase::RenderFrameDeleted(
PrintManager::PrintingRenderFrameDeleted(); PrintManager::PrintingRenderFrameDeleted();
ReleasePrinterQuery(); ReleasePrinterQuery();
if (!print_job_.get()) if (!print_job_)
return; return;
scoped_refptr<PrintedDocument> document(print_job_->document()); scoped_refptr<PrintedDocument> document(print_job_->document());
if (document.get()) { if (document) {
// If IsComplete() returns false, the document isn't completely rendered. // If IsComplete() returns false, the document isn't completely rendered.
// Since our renderer is gone, there's nothing to do, cancel it. Otherwise, // Since our renderer is gone, there's nothing to do, cancel it. Otherwise,
// the print job may finish without problem. // the print job may finish without problem.
...@@ -523,7 +523,7 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent( ...@@ -523,7 +523,7 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
} }
bool PrintViewManagerBase::RenderAllMissingPagesNow() { bool PrintViewManagerBase::RenderAllMissingPagesNow() {
if (!print_job_.get() || !print_job_->is_job_pending()) if (!print_job_ || !print_job_->is_job_pending())
return false; return false;
// Is the document already complete? // Is the document already complete?
...@@ -571,8 +571,9 @@ void PrintViewManagerBase::ShouldQuitFromInnerMessageLoop() { ...@@ -571,8 +571,9 @@ void PrintViewManagerBase::ShouldQuitFromInnerMessageLoop() {
} }
} }
bool PrintViewManagerBase::CreateNewPrintJob(PrintJobWorkerOwner* job) { bool PrintViewManagerBase::CreateNewPrintJob(PrinterQuery* query) {
DCHECK(!inside_inner_message_loop_); DCHECK(!inside_inner_message_loop_);
DCHECK(query);
// Disconnect the current |print_job_|. // Disconnect the current |print_job_|.
DisconnectFromCurrentPrintJob(); DisconnectFromCurrentPrintJob();
...@@ -583,13 +584,9 @@ bool PrintViewManagerBase::CreateNewPrintJob(PrintJobWorkerOwner* job) { ...@@ -583,13 +584,9 @@ bool PrintViewManagerBase::CreateNewPrintJob(PrintJobWorkerOwner* job) {
return false; return false;
} }
DCHECK(!print_job_.get()); DCHECK(!print_job_);
DCHECK(job);
if (!job)
return false;
print_job_ = base::MakeRefCounted<PrintJob>(); print_job_ = base::MakeRefCounted<PrintJob>();
print_job_->Initialize(job, RenderSourceName(), number_pages_); print_job_->Initialize(query, RenderSourceName(), number_pages_);
registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT, registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
content::Source<PrintJob>(print_job_.get())); content::Source<PrintJob>(print_job_.get()));
printing_succeeded_ = false; printing_succeeded_ = false;
...@@ -602,8 +599,7 @@ void PrintViewManagerBase::DisconnectFromCurrentPrintJob() { ...@@ -602,8 +599,7 @@ void PrintViewManagerBase::DisconnectFromCurrentPrintJob() {
bool result = RenderAllMissingPagesNow(); bool result = RenderAllMissingPagesNow();
// Verify that assertion. // Verify that assertion.
if (print_job_.get() && if (print_job_ && print_job_->document() &&
print_job_->document() &&
!print_job_->document()->IsComplete()) { !print_job_->document()->IsComplete()) {
DCHECK(!result); DCHECK(!result);
// That failed. // That failed.
...@@ -615,7 +611,7 @@ void PrintViewManagerBase::DisconnectFromCurrentPrintJob() { ...@@ -615,7 +611,7 @@ void PrintViewManagerBase::DisconnectFromCurrentPrintJob() {
} }
void PrintViewManagerBase::TerminatePrintJob(bool cancel) { void PrintViewManagerBase::TerminatePrintJob(bool cancel) {
if (!print_job_.get()) if (!print_job_)
return; return;
if (cancel) { if (cancel) {
...@@ -638,7 +634,7 @@ void PrintViewManagerBase::ReleasePrintJob() { ...@@ -638,7 +634,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
content::RenderFrameHost* rfh = printing_rfh_; content::RenderFrameHost* rfh = printing_rfh_;
printing_rfh_ = nullptr; printing_rfh_ = nullptr;
if (!print_job_.get()) if (!print_job_)
return; return;
if (rfh) { if (rfh) {
...@@ -692,7 +688,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { ...@@ -692,7 +688,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
} }
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
if (print_job_.get()) if (print_job_)
return true; return true;
if (!cookie) { if (!cookie) {
...@@ -704,7 +700,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { ...@@ -704,7 +700,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
// The job was initiated by a script. Time to get the corresponding worker // The job was initiated by a script. Time to get the corresponding worker
// thread. // thread.
scoped_refptr<PrinterQuery> queued_query = queue_->PopPrinterQuery(cookie); scoped_refptr<PrinterQuery> queued_query = queue_->PopPrinterQuery(cookie);
if (!queued_query.get()) { if (!queued_query) {
NOTREACHED(); NOTREACHED();
return false; return false;
} }
...@@ -748,7 +744,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() { ...@@ -748,7 +744,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
scoped_refptr<PrinterQuery> printer_query; scoped_refptr<PrinterQuery> printer_query;
printer_query = queue_->PopPrinterQuery(cookie); printer_query = queue_->PopPrinterQuery(cookie);
if (!printer_query.get()) if (!printer_query)
return; return;
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE, BrowserThread::IO, FROM_HERE,
......
...@@ -35,7 +35,6 @@ namespace printing { ...@@ -35,7 +35,6 @@ namespace printing {
class JobEventDetails; class JobEventDetails;
class PrintJob; class PrintJob;
class PrintJobWorkerOwner;
class PrintQueriesQueue; class PrintQueriesQueue;
class PrintedDocument; class PrintedDocument;
class PrinterQuery; class PrinterQuery;
...@@ -94,7 +93,7 @@ class PrintViewManagerBase : public content::NotificationObserver, ...@@ -94,7 +93,7 @@ class PrintViewManagerBase : public content::NotificationObserver,
// currently a print job, safely disconnect from it. Returns false if it is // currently a print job, safely disconnect from it. Returns false if it is
// impossible to safely disconnect from the current print job or it is // impossible to safely disconnect from the current print job or it is
// impossible to create a new print job. // impossible to create a new print job.
virtual bool CreateNewPrintJob(PrintJobWorkerOwner* job); virtual bool CreateNewPrintJob(PrinterQuery* query);
// Manages the low-level talk to the printer. // Manages the low-level talk to the printer.
scoped_refptr<PrintJob> print_job_; scoped_refptr<PrintJob> print_job_;
...@@ -129,12 +128,12 @@ class PrintViewManagerBase : public content::NotificationObserver, ...@@ -129,12 +128,12 @@ class PrintViewManagerBase : public content::NotificationObserver,
const scoped_refptr<base::RefCountedMemory>& print_data, const scoped_refptr<base::RefCountedMemory>& print_data,
int page_count, int page_count,
PrinterHandler::PrintCallback callback, PrinterHandler::PrintCallback callback,
scoped_refptr<printing::PrinterQuery> printer_query); scoped_refptr<PrinterQuery> printer_query);
void StartLocalPrintJob( void StartLocalPrintJob(
const scoped_refptr<base::RefCountedMemory>& print_data, const scoped_refptr<base::RefCountedMemory>& print_data,
int page_count, int page_count,
scoped_refptr<printing::PrinterQuery> printer_query, scoped_refptr<PrinterQuery> printer_query,
PrinterHandler::PrintCallback callback); PrinterHandler::PrintCallback callback);
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
...@@ -211,7 +210,7 @@ class PrintViewManagerBase : public content::NotificationObserver, ...@@ -211,7 +210,7 @@ class PrintViewManagerBase : public content::NotificationObserver,
// Whether printing is enabled. // Whether printing is enabled.
BooleanPrefMember printing_enabled_; BooleanPrefMember printing_enabled_;
scoped_refptr<printing::PrintQueriesQueue> queue_; scoped_refptr<PrintQueriesQueue> queue_;
base::WeakPtrFactory<PrintViewManagerBase> weak_ptr_factory_; base::WeakPtrFactory<PrintViewManagerBase> weak_ptr_factory_;
......
...@@ -71,9 +71,9 @@ class TestPrintViewManager : public PrintViewManagerBase { ...@@ -71,9 +71,9 @@ class TestPrintViewManager : public PrintViewManagerBase {
protected: protected:
// Override to create a TestPrintJob instead of a real one. // Override to create a TestPrintJob instead of a real one.
bool CreateNewPrintJob(PrintJobWorkerOwner* job) override { bool CreateNewPrintJob(PrinterQuery* query) override {
print_job_ = base::MakeRefCounted<TestPrintJob>(); print_job_ = base::MakeRefCounted<TestPrintJob>();
print_job_->Initialize(job, RenderSourceName(), number_pages_); print_job_->Initialize(query, RenderSourceName(), number_pages_);
return true; return true;
} }
......
...@@ -37,7 +37,6 @@ class PrinterQuery : public PrintJobWorkerOwner { ...@@ -37,7 +37,6 @@ class PrinterQuery : public PrintJobWorkerOwner {
std::unique_ptr<PrintJobWorker> DetachWorker( std::unique_ptr<PrintJobWorker> DetachWorker(
PrintJobWorkerOwner* new_owner) override; PrintJobWorkerOwner* new_owner) override;
const PrintSettings& settings() const override; const PrintSettings& settings() const override;
int cookie() const override;
// Initializes the printing context. It is fine to call this function multiple // Initializes the printing context. It is fine to call this function multiple
// times to reinitialize the settings. |web_contents_observer| can be queried // times to reinitialize the settings. |web_contents_observer| can be queried
...@@ -67,12 +66,16 @@ class PrinterQuery : public PrintJobWorkerOwner { ...@@ -67,12 +66,16 @@ class PrinterQuery : public PrintJobWorkerOwner {
// Returns true if a GetSettings() call is pending completion. // Returns true if a GetSettings() call is pending completion.
bool is_callback_pending() const; bool is_callback_pending() const;
int cookie() const;
PrintingContext::Result last_status() const { return last_status_; } PrintingContext::Result last_status() const { return last_status_; }
// Returns if a worker thread is still associated to this instance. // Returns if a worker thread is still associated to this instance.
bool is_valid() const; bool is_valid() const;
protected: protected:
// Refcounted class.
~PrinterQuery() override;
// For unit tests to manually set the print callback. // For unit tests to manually set the print callback.
void set_callback(base::OnceClosure callback); void set_callback(base::OnceClosure callback);
...@@ -81,9 +84,6 @@ class PrinterQuery : public PrintJobWorkerOwner { ...@@ -81,9 +84,6 @@ class PrinterQuery : public PrintJobWorkerOwner {
// worker thread per print job. // worker thread per print job.
std::unique_ptr<PrintJobWorker> worker_; std::unique_ptr<PrintJobWorker> worker_;
// Refcounted class.
~PrinterQuery() override;
private: private:
// Lazy create the worker thread. There is one worker thread per print job. // Lazy create the worker thread. There is one worker thread per print job.
void StartWorker(base::OnceClosure callback); void StartWorker(base::OnceClosure callback);
......
...@@ -9,23 +9,23 @@ ...@@ -9,23 +9,23 @@
#include "base/memory/ref_counted_memory.h" #include "base/memory/ref_counted_memory.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/printing/print_job_worker.h" #include "chrome/browser/printing/print_job_worker.h"
#include "chrome/browser/printing/print_job_worker_owner.h" #include "chrome/browser/printing/printer_query.h"
#include "chrome/browser/printing/test_print_job.h" #include "chrome/browser/printing/test_print_job.h"
#include "printing/printed_document.h" #include "printing/printed_document.h"
#include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/size.h"
namespace printing { namespace printing {
void TestPrintJob::Initialize(PrintJobWorkerOwner* job, void TestPrintJob::Initialize(PrinterQuery* query,
const base::string16& name, const base::string16& name,
int page_count) { int page_count) {
// Since we do not actually print in these tests, just let this get destroyed // Since we do not actually print in these tests, just let this get destroyed
// when this function exits. // when this function exits.
std::unique_ptr<PrintJobWorker> worker = job->DetachWorker(this); std::unique_ptr<PrintJobWorker> worker = query->DetachWorker(this);
set_settings(job->settings()); set_settings(query->settings());
scoped_refptr<PrintedDocument> new_doc = scoped_refptr<PrintedDocument> new_doc =
base::MakeRefCounted<PrintedDocument>(settings(), name, job->cookie()); base::MakeRefCounted<PrintedDocument>(settings(), name, query->cookie());
new_doc->set_page_count(page_count); new_doc->set_page_count(page_count);
UpdatePrintedDocument(new_doc.get()); UpdatePrintedDocument(new_doc.get());
......
...@@ -11,11 +11,12 @@ ...@@ -11,11 +11,12 @@
#include "base/macros.h" #include "base/macros.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/printing/print_job.h" #include "chrome/browser/printing/print_job.h"
#include "chrome/browser/printing/print_job_worker_owner.h"
#include "printing/print_settings.h" #include "printing/print_settings.h"
namespace printing { namespace printing {
class PrinterQuery;
class TestPrintJob : public PrintJob { class TestPrintJob : public PrintJob {
public: public:
// Create a empty PrintJob. When initializing with this constructor, // Create a empty PrintJob. When initializing with this constructor,
...@@ -36,7 +37,7 @@ class TestPrintJob : public PrintJob { ...@@ -36,7 +37,7 @@ class TestPrintJob : public PrintJob {
const content::NotificationDetails& details) override {} const content::NotificationDetails& details) override {}
// All remaining functions are PrintJob implementation. // All remaining functions are PrintJob implementation.
void Initialize(PrintJobWorkerOwner* job, void Initialize(PrinterQuery* query,
const base::string16& name, const base::string16& name,
int page_count) override; int page_count) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment