Index: chrome/browser/printing/print_job.h |
=================================================================== |
--- chrome/browser/printing/print_job.h (revision 137865) |
+++ chrome/browser/printing/print_job.h (working copy) |
@@ -8,6 +8,7 @@ |
#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/message_loop.h" |
#include "chrome/browser/printing/print_job_worker_owner.h" |
#include "content/public/browser/notification_observer.h" |
@@ -108,6 +109,9 @@ |
// eventual deadlock. |
void ControlledWorkerShutdown(); |
+ // Called at shutdown when running a nested message loop. |
+ void Quit(); |
+ |
content::NotificationRegistrar registrar_; |
// Main message loop reference. Used to send notifications in the right |
@@ -136,6 +140,9 @@ |
// the notified calls Cancel() again. |
bool is_canceling_; |
+ // Used at shutdown so that we can quit a nested message loop. |
+ base::WeakPtrFactory<PrintJob> quit_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PrintJob); |
}; |