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_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_H_ |
6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.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" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 PrintJob(); | 44 PrintJob(); |
45 | 45 |
46 // Grabs the ownership of the PrintJobWorker from another job, which is | 46 // Grabs the ownership of the PrintJobWorker from another job, which is |
47 // usually a PrinterQuery. Set the expected page count of the print job. | 47 // usually a PrinterQuery. Set the expected page count of the print job. |
48 void Initialize(PrintJobWorkerOwner* job, PrintedPagesSource* source, | 48 void Initialize(PrintJobWorkerOwner* job, PrintedPagesSource* source, |
49 int page_count); | 49 int page_count); |
50 | 50 |
51 // content::NotificationObserver implementation. | 51 // content::NotificationObserver implementation. |
52 virtual void Observe(int type, | 52 virtual void Observe(int type, |
53 const content::NotificationSource& source, | 53 const content::NotificationSource& source, |
54 const content::NotificationDetails& details) OVERRIDE; | 54 const content::NotificationDetails& details) override; |
55 | 55 |
56 // PrintJobWorkerOwner implementation. | 56 // PrintJobWorkerOwner implementation. |
57 virtual void GetSettingsDone(const PrintSettings& new_settings, | 57 virtual void GetSettingsDone(const PrintSettings& new_settings, |
58 PrintingContext::Result result) OVERRIDE; | 58 PrintingContext::Result result) override; |
59 virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) OVERRIDE; | 59 virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) override; |
60 virtual const PrintSettings& settings() const OVERRIDE; | 60 virtual const PrintSettings& settings() const override; |
61 virtual int cookie() const OVERRIDE; | 61 virtual int cookie() const override; |
62 | 62 |
63 // Starts the actual printing. Signals the worker that it should begin to | 63 // Starts the actual printing. Signals the worker that it should begin to |
64 // spool as soon as data is available. | 64 // spool as soon as data is available. |
65 void StartPrinting(); | 65 void StartPrinting(); |
66 | 66 |
67 // Asks for the worker thread to finish its queued tasks and disconnects the | 67 // Asks for the worker thread to finish its queued tasks and disconnects the |
68 // delegate object. The PrintJobManager will remove its reference. This may | 68 // delegate object. The PrintJobManager will remove its reference. This may |
69 // have the side-effect of destroying the object if the caller doesn't have a | 69 // have the side-effect of destroying the object if the caller doesn't have a |
70 // handle to the object. Use PrintJob::is_stopped() to check whether the | 70 // handle to the object. Use PrintJob::is_stopped() to check whether the |
71 // worker thread has actually stopped. | 71 // worker thread has actually stopped. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 scoped_refptr<PrintedDocument> document_; | 217 scoped_refptr<PrintedDocument> document_; |
218 scoped_refptr<PrintedPage> page_; | 218 scoped_refptr<PrintedPage> page_; |
219 const Type type_; | 219 const Type type_; |
220 | 220 |
221 DISALLOW_COPY_AND_ASSIGN(JobEventDetails); | 221 DISALLOW_COPY_AND_ASSIGN(JobEventDetails); |
222 }; | 222 }; |
223 | 223 |
224 } // namespace printing | 224 } // namespace printing |
225 | 225 |
226 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_H_ | 226 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_H_ |
OLD | NEW |