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..3ea70a63cec5365d459bc3833c2e7a8585b59437 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,9 @@ 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. |
+ 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 +62,9 @@ class PrintJobManager : public content::NotificationObserver { |
// prefs::kPrintingEnabled via g_browser_process->local_state() directly. |
bool printing_enabled() const; |
+ // May return NULL when no destination was set. |
+ PrintDestinationInterface* destination() const { return destination_.get(); } |
+ |
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_; |