Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7752)

Unified Diff: chrome/service/cloud_print/printer_job_handler.h

Issue 11360151: Move common cloud print methods from service/cloud_print to common/cloud_print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/service/cloud_print/print_system_cups.cc ('k') | chrome/service/cloud_print/printer_job_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/printer_job_handler.h
diff --git a/chrome/service/cloud_print/printer_job_handler.h b/chrome/service/cloud_print/printer_job_handler.h
index 7ee440cec77798bbaec310f9fadb0b7db3b05e59..9090ca388dcdcf42674cb02e338192bb8c4843ab 100644
--- a/chrome/service/cloud_print/printer_job_handler.h
+++ b/chrome/service/cloud_print/printer_job_handler.h
@@ -61,11 +61,13 @@ class URLFetcher;
// Stop
// (If there are pending tasks go back to Start)
+namespace cloud_print {
+
class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
public CloudPrintURLFetcherDelegate,
public JobStatusUpdaterDelegate,
- public cloud_print::PrinterWatcherDelegate,
- public cloud_print::JobSpoolerDelegate {
+ public PrinterWatcherDelegate,
+ public JobSpoolerDelegate {
public:
class Delegate {
public:
@@ -88,7 +90,7 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
PrinterJobHandler(const printing::PrinterBasicInfo& printer_info,
const PrinterInfoFromCloud& printer_info_from_server,
const GURL& cloud_print_server_url,
- cloud_print::PrintSystem* print_system,
+ PrintSystem* print_system,
Delegate* delegate);
bool Initialize();
@@ -132,15 +134,14 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
virtual bool OnJobCompleted(JobStatusUpdater* updater) OVERRIDE;
virtual void OnAuthError() OVERRIDE;
- // cloud_print::PrinterWatcherDelegate implementation
+ // PrinterWatcherDelegate implementation
virtual void OnPrinterDeleted() OVERRIDE;
virtual void OnPrinterChanged() OVERRIDE;
virtual void OnJobChanged() OVERRIDE;
- // cloud_print::JobSpoolerDelegate implementation.
+ // JobSpoolerDelegate implementation.
// Called on print_thread_.
- virtual void OnJobSpoolSucceeded(
- const cloud_print::PlatformJobId& job_id) OVERRIDE;
+ virtual void OnJobSpoolSucceeded(const PlatformJobId& job_id) OVERRIDE;
virtual void OnJobSpoolFailed() OVERRIDE;
// End Delegate implementations
@@ -229,7 +230,7 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
void StartPrinting();
void Reset();
- void UpdateJobStatus(cloud_print::PrintJobStatus status, PrintJobError error);
+ void UpdateJobStatus(PrintJobStatus status, PrintJobError error);
// Sets the next response handler to the specifed JSON data handler.
void SetNextJSONHandler(JSONDataHandler handler);
@@ -237,7 +238,7 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
void SetNextDataHandler(DataHandler handler);
void JobFailed(PrintJobError error);
- void JobSpooled(cloud_print::PlatformJobId local_job_id);
+ void JobSpooled(PlatformJobId local_job_id);
// Returns false if printer info is up to date and no updating is needed.
bool UpdatePrinterInfo();
bool HavePendingTasks();
@@ -254,7 +255,7 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
const std::string& printer_name);
scoped_refptr<CloudPrintURLFetcher> request_;
- scoped_refptr<cloud_print::PrintSystem> print_system_;
+ scoped_refptr<PrintSystem> print_system_;
printing::PrinterBasicInfo printer_info_;
PrinterInfoFromCloud printer_info_cloud_;
GURL cloud_print_server_url_;
@@ -263,7 +264,7 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
Delegate* delegate_;
// Once the job has been spooled to the local spooler, this specifies the
// job id of the job on the local spooler.
- cloud_print::PlatformJobId local_job_id_;
+ PlatformJobId local_job_id_;
// The next response handler can either be a JSONDataHandler or a
// DataHandler (depending on the current request being made).
@@ -275,7 +276,7 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
base::Thread print_thread_;
// The Job spooler object. This is only non-NULL during a print operation.
// It lives and dies on |print_thread_|
- scoped_refptr<cloud_print::PrintSystem::JobSpooler> job_spooler_;
+ scoped_refptr<PrintSystem::JobSpooler> job_spooler_;
// The message loop proxy representing the thread on which this object
// was created. Used by the print thread.
scoped_refptr<base::MessageLoopProxy> job_handler_message_loop_proxy_;
@@ -293,7 +294,7 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
// Some task in the state machine is in progress.
bool task_in_progress_;
- scoped_refptr<cloud_print::PrintSystem::PrinterWatcher> printer_watcher_;
+ scoped_refptr<PrintSystem::PrinterWatcher> printer_watcher_;
typedef std::list< scoped_refptr<JobStatusUpdater> > JobStatusUpdaterList;
JobStatusUpdaterList job_status_updater_list_;
@@ -309,4 +310,6 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
// the workaround was not needed for my machine).
typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate;
+} // namespace cloud_print
+
#endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_
« no previous file with comments | « chrome/service/cloud_print/print_system_cups.cc ('k') | chrome/service/cloud_print/printer_job_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698