OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // have the side-effect of destroying the object if the caller doesn't have a | 71 // have the side-effect of destroying the object if the caller doesn't have a |
72 // handle to the object. | 72 // handle to the object. |
73 void Stop(); | 73 void Stop(); |
74 | 74 |
75 // Cancels printing job and stops the worker thread. Takes effect immediately. | 75 // Cancels printing job and stops the worker thread. Takes effect immediately. |
76 void Cancel(); | 76 void Cancel(); |
77 | 77 |
78 // Synchronously wait for the job to finish. It is mainly useful when the | 78 // Synchronously wait for the job to finish. It is mainly useful when the |
79 // process is about to be shut down and we're waiting for the spooler to eat | 79 // process is about to be shut down and we're waiting for the spooler to eat |
80 // our data. | 80 // our data. |
81 bool FlushJob(int timeout_ms); | 81 bool FlushJob(base::TimeDelta timeout); |
82 | 82 |
83 // Disconnects the PrintedPage source (PrintedPagesSource). It is done when | 83 // Disconnects the PrintedPage source (PrintedPagesSource). It is done when |
84 // the source is being destroyed. | 84 // the source is being destroyed. |
85 void DisconnectSource(); | 85 void DisconnectSource(); |
86 | 86 |
87 // Returns true if the print job is pending, i.e. between a StartPrinting() | 87 // Returns true if the print job is pending, i.e. between a StartPrinting() |
88 // and the end of the spooling. | 88 // and the end of the spooling. |
89 bool is_job_pending() const; | 89 bool is_job_pending() const; |
90 | 90 |
91 // Access the current printed document. Warning: may be NULL. | 91 // Access the current printed document. Warning: may be NULL. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 scoped_refptr<PrintedDocument> document_; | 201 scoped_refptr<PrintedDocument> document_; |
202 scoped_refptr<PrintedPage> page_; | 202 scoped_refptr<PrintedPage> page_; |
203 const Type type_; | 203 const Type type_; |
204 | 204 |
205 DISALLOW_COPY_AND_ASSIGN(JobEventDetails); | 205 DISALLOW_COPY_AND_ASSIGN(JobEventDetails); |
206 }; | 206 }; |
207 | 207 |
208 } // namespace printing | 208 } // namespace printing |
209 | 209 |
210 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_H_ | 210 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_H_ |
OLD | NEW |