Chromium Code Reviews| Index: chrome/browser/printing/print_job_manager.h |
| diff --git a/chrome/browser/printing/print_job_manager.h b/chrome/browser/printing/print_job_manager.h |
| index 4fc34d4a3213bfe0c2020cc069cda03b0d52f457..4b890527885db14a7b8b6151537de1929dafea66 100644 |
| --- a/chrome/browser/printing/print_job_manager.h |
| +++ b/chrome/browser/printing/print_job_manager.h |
| @@ -13,6 +13,7 @@ |
| #include "chrome/browser/prefs/pref_member.h" |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| +#include "printing/print_destination_interface.h" |
| class PrefService; |
| @@ -38,6 +39,10 @@ class PrintJobManager : public content::NotificationObserver { |
| // a chance to complete before stopping them. |
| void StopJobs(bool wait_for_finish); |
| + // Sets the print destination to be set on the next print job. The value is |
| + // automatically reset to NULL when the JOB_DONE event is received. |
|
robertshield
2012/06/28 17:48:54
The last sentence describes implementation, not in
MAD
2012/06/28 19:05:51
Good point, I thought the caller might need to kno
|
| + void SetPrintDestination(PrintDestinationInterface* destination); |
| + |
| // Queues a semi-initialized worker thread. Can be called from any thread. |
| // Current use case is queuing from the I/O thread. |
| // TODO(maruel): Have them vanish after a timeout (~5 minutes?) |
| @@ -58,6 +63,8 @@ class PrintJobManager : public content::NotificationObserver { |
| // prefs::kPrintingEnabled via g_browser_process->local_state() directly. |
| bool printing_enabled() const; |
| + PrintDestinationInterface* destination() const { return destination_.get(); } |
|
robertshield
2012/06/28 17:48:54
Mention here that this may return NULL.
MAD
2012/06/28 19:05:51
Done.
|
| + |
| private: |
| typedef std::vector<scoped_refptr<PrintJob> > PrintJobs; |
| typedef std::vector<scoped_refptr<PrinterQuery> > PrinterQueries; |
| @@ -83,6 +90,8 @@ class PrintJobManager : public content::NotificationObserver { |
| PrinterQueries queued_queries_; |
| + scoped_refptr<PrintDestinationInterface> destination_; |
| + |
| // Current print jobs that are active. |
| PrintJobs current_jobs_; |