diff options
Diffstat (limited to 'chrome/browser/printing/printer_query.h')
-rw-r--r-- | chrome/browser/printing/printer_query.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/printing/printer_query.h b/chrome/browser/printing/printer_query.h index 3add3e4..dcb2f6a 100644 --- a/chrome/browser/printing/printer_query.h +++ b/chrome/browser/printing/printer_query.h @@ -6,13 +6,13 @@ #define CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ #pragma once +#include "base/callback.h" #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/printing/print_job_worker_owner.h" #include "printing/print_job_constants.h" #include "ui/gfx/native_widget_types.h" -class CancelableTask; class MessageLoop; namespace base { @@ -51,11 +51,11 @@ class PrinterQuery : public PrintJobWorkerOwner { int expected_page_count, bool has_selection, MarginType margin_type, - CancelableTask* callback); + const base::Closure& callback); // Updates the current settings with |new_settings| dictionary values. void SetSettings(const base::DictionaryValue& new_settings, - CancelableTask* callback); + const base::Closure& callback); // Stops the worker thread since the client is done with this object. void StopWorker(); @@ -72,8 +72,7 @@ class PrinterQuery : public PrintJobWorkerOwner { virtual ~PrinterQuery(); // Lazy create the worker thread. There is one worker thread per print job. - // Returns true, if worker thread exists or has been created. - bool StartWorker(CancelableTask* callback); + void StartWorker(const base::Closure& callback); // Main message loop reference. Used to send notifications in the right // thread. @@ -96,8 +95,8 @@ class PrinterQuery : public PrintJobWorkerOwner { // Results from the last GetSettingsDone() callback. PrintingContext::Result last_status_; - // Task waiting to be executed. - scoped_ptr<CancelableTask> callback_; + // Callback waiting to be run. + base::Closure callback_; DISALLOW_COPY_AND_ASSIGN(PrinterQuery); }; |