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

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

Issue 3051006: Used the service utility process host to render PDFs in a sandbox for the Win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: CUPS tweaks Created 10 years, 5 months 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_win.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
===================================================================
--- chrome/service/cloud_print/printer_job_handler.h (revision 53070)
+++ chrome/service/cloud_print/printer_job_handler.h (working copy)
@@ -10,6 +10,7 @@
#include "base/file_path.h"
#include "base/ref_counted.h"
+#include "base/message_loop_proxy.h"
#include "base/thread.h"
#include "chrome/service/cloud_print/job_status_updater.h"
#include "chrome/service/cloud_print/print_system.h"
@@ -61,7 +62,8 @@
class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>,
public URLFetcherDelegate,
public JobStatusUpdaterDelegate,
- public cloud_print::PrinterWatcherDelegate {
+ public cloud_print::PrinterWatcherDelegate,
+ public cloud_print::JobSpoolerDelegate {
enum PrintJobError {
SUCCESS,
JOB_DOWNLOAD_FAILED,
@@ -121,6 +123,11 @@
virtual void OnPrinterChanged();
virtual void OnJobChanged();
+ // cloud_print::JobSpoolerDelegate implementation.
+ // Called on print_thread_.
+ virtual void OnJobSpoolSucceeded(const cloud_print::PlatformJobId& job_id);
+ virtual void OnJobSpoolFailed();
+
// End Delegate implementations
private:
@@ -207,11 +214,9 @@
bool HavePendingTasks();
void FailedFetchingJobData();
- 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);
+ // Called on print_thread_.
+ void DoPrint(const JobDetails& job_details,
+ const std::string& printer_name);
scoped_ptr<URLFetcher> request_;
scoped_refptr<cloud_print::PrintSystem> print_system_;
@@ -232,6 +237,13 @@
int server_error_count_;
// The thread on which the actual print operation happens
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_;
+ // 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_;
+
// There may be pending tasks in the message queue when Shutdown is called.
// We set this flag so as to do nothing in those tasks.
bool shutting_down_;
« no previous file with comments | « chrome/service/cloud_print/print_system_win.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