| Index: chrome/service/cloud_print/printer_job_handler.h
|
| ===================================================================
|
| --- chrome/service/cloud_print/printer_job_handler.h (revision 48976)
|
| +++ chrome/service/cloud_print/printer_job_handler.h (working copy)
|
| @@ -12,7 +12,7 @@
|
| #include "base/ref_counted.h"
|
| #include "base/thread.h"
|
| #include "chrome/service/cloud_print/job_status_updater.h"
|
| -#include "chrome/service/cloud_print/printer_info.h"
|
| +#include "chrome/service/cloud_print/print_system.h"
|
| #include "chrome/common/net/url_fetcher.h"
|
| #include "googleurl/src/gurl.h"
|
| #include "net/url_request/url_request_status.h"
|
| @@ -61,7 +61,7 @@
|
| class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
|
| public URLFetcherDelegate,
|
| public JobStatusUpdaterDelegate,
|
| - public cloud_print::PrinterChangeNotifierDelegate {
|
| + public cloud_print::PrinterWatcherDelegate {
|
| enum PrintJobError {
|
| SUCCESS,
|
| JOB_DOWNLOAD_FAILED,
|
| @@ -92,11 +92,12 @@
|
|
|
| // Begin public interface
|
| PrinterJobHandler(const cloud_print::PrinterBasicInfo& printer_info,
|
| - const std::string& printer_id,
|
| - const std::string& caps_hash,
|
| - const std::string& auth_token,
|
| - const GURL& cloud_print_server_url,
|
| - Delegate* delegate);
|
| + const std::string& printer_id,
|
| + const std::string& caps_hash,
|
| + const std::string& auth_token,
|
| + const GURL& cloud_print_server_url,
|
| + cloud_print::PrintSystem* print_system,
|
| + Delegate* delegate);
|
| ~PrinterJobHandler();
|
| bool Initialize();
|
| // Notifies the JobHandler that a job is available
|
| @@ -115,8 +116,7 @@
|
| const std::string& data);
|
| // JobStatusUpdater::Delegate implementation
|
| virtual bool OnJobCompleted(JobStatusUpdater* updater);
|
| - // cloud_print::PrinterChangeNotifier::Delegate implementation
|
| - virtual void OnPrinterAdded();
|
| + // cloud_print::PrinterWatcherDelegate implementation
|
| virtual void OnPrinterDeleted();
|
| virtual void OnPrinterChanged();
|
| virtual void OnJobChanged();
|
| @@ -194,11 +194,12 @@
|
|
|
| static void DoPrint(const JobDetails& job_details,
|
| const std::string& printer_name,
|
| + scoped_refptr<cloud_print::PrintSystem> print_system,
|
| PrinterJobHandler* job_handler,
|
| MessageLoop* job_message_loop);
|
|
|
| -
|
| scoped_ptr<URLFetcher> request_;
|
| + scoped_refptr<cloud_print::PrintSystem> print_system_;
|
| cloud_print::PrinterBasicInfo printer_info_;
|
| std::string printer_id_;
|
| std::string auth_token_;
|
| @@ -226,7 +227,7 @@
|
|
|
| // Some task in the state machine is in progress.
|
| bool task_in_progress_;
|
| - cloud_print::PrinterChangeNotifier printer_change_notifier_;
|
| + scoped_refptr<cloud_print::PrintSystem::PrinterWatcher> printer_watcher_;
|
| typedef std::list< scoped_refptr<JobStatusUpdater> > JobStatusUpdaterList;
|
| JobStatusUpdaterList job_status_updater_list_;
|
|
|
|
|