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

Unified Diff: chrome/browser/printing/print_job.h

Issue 11534: Add superficial unit test for PrintJob. That's a start.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | « base/thread_unittest.cc ('k') | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_job.h
===================================================================
--- chrome/browser/printing/print_job.h (revision 5751)
+++ chrome/browser/printing/print_job.h (working copy)
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_H_
#define CHROME_BROWSER_PRINTING_PRINT_JOB_H_
+#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "chrome/browser/printing/print_job_worker_owner.h"
#include "chrome/common/notification_service.h"
@@ -32,7 +33,8 @@
// runs in the UI thread.
class PrintJob : public base::RefCountedThreadSafe<PrintJob>,
public NotificationObserver,
- public PrintJobWorkerOwner {
+ public PrintJobWorkerOwner,
+ public MessageLoop::DestructionObserver {
public:
// GetSettings() UI parameter.
enum GetSettingsAskParam {
@@ -48,6 +50,8 @@
PrintJob();
virtual ~PrintJob();
+ // Grabs the ownership of the PrintJobWorker from another job, which is
+ // usually a PrinterQuery.
void Initialize(PrintJobWorkerOwner* job, PrintedPagesSource* source);
// NotificationObserver
@@ -69,6 +73,9 @@
virtual const PrintSettings& settings() const { return settings_; }
virtual int cookie() const;
+ // DestructionObserver
+ virtual void WillDestroyCurrentMessageLoop();
+
// Initializes the printing context. This can be done synchronously or not. It
// is fine to call this function multiple times to reinitialize the settings.
// |parent_window| parameter will be the owner of the print setting dialog
« no previous file with comments | « base/thread_unittest.cc ('k') | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698