OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ |
6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
12 #include "printing/page_number.h" | 12 #include "printing/page_number.h" |
13 #include "printing/print_destination_interface.h" | 13 #include "printing/print_destination_interface.h" |
14 #include "printing/printing_context.h" | 14 #include "printing/printing_context.h" |
15 #include "printing/print_job_constants.h" | 15 #include "printing/print_job_constants.h" |
16 | 16 |
17 class PrintingUIWebContentsObserver; | |
18 | |
19 namespace base { | 17 namespace base { |
20 class DictionaryValue; | 18 class DictionaryValue; |
21 } | 19 } |
22 | 20 |
23 namespace printing { | 21 namespace printing { |
24 | 22 |
| 23 class PrintJob; |
| 24 class PrintJobWorkerOwner; |
25 class PrintedDocument; | 25 class PrintedDocument; |
26 class PrintedPage; | 26 class PrintedPage; |
27 class PrintJob; | 27 class PrintingUIWebContentsObserver; |
28 class PrintJobWorkerOwner; | |
29 | 28 |
30 // Worker thread code. It manages the PrintingContext, which can be blocking | 29 // Worker thread code. It manages the PrintingContext, which can be blocking |
31 // and/or run a message loop. This is the object that generates most | 30 // and/or run a message loop. This is the object that generates most |
32 // NOTIFY_PRINT_JOB_EVENT notifications, but they are generated through a | 31 // NOTIFY_PRINT_JOB_EVENT notifications, but they are generated through a |
33 // NotificationTask task to be executed from the right thread, the UI thread. | 32 // NotificationTask task to be executed from the right thread, the UI thread. |
34 // PrintJob always outlives its worker instance. | 33 // PrintJob always outlives its worker instance. |
35 class PrintJobWorker { | 34 class PrintJobWorker { |
36 public: | 35 public: |
37 explicit PrintJobWorker(PrintJobWorkerOwner* owner); | 36 explicit PrintJobWorker(PrintJobWorkerOwner* owner); |
38 virtual ~PrintJobWorker(); | 37 virtual ~PrintJobWorker(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 156 |
158 // Used to generate a WeakPtr for callbacks. | 157 // Used to generate a WeakPtr for callbacks. |
159 base::WeakPtrFactory<PrintJobWorker> weak_factory_; | 158 base::WeakPtrFactory<PrintJobWorker> weak_factory_; |
160 | 159 |
161 DISALLOW_COPY_AND_ASSIGN(PrintJobWorker); | 160 DISALLOW_COPY_AND_ASSIGN(PrintJobWorker); |
162 }; | 161 }; |
163 | 162 |
164 } // namespace printing | 163 } // namespace printing |
165 | 164 |
166 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ | 165 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ |
OLD | NEW |