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 <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // PrintJob. | 204 // PrintJob. |
205 JOB_DONE, | 205 JOB_DONE, |
206 | 206 |
207 // All missing pages have been requested. | 207 // All missing pages have been requested. |
208 ALL_PAGES_REQUESTED, | 208 ALL_PAGES_REQUESTED, |
209 | 209 |
210 // An error occured. Printing is canceled. | 210 // An error occured. Printing is canceled. |
211 FAILED, | 211 FAILED, |
212 }; | 212 }; |
213 | 213 |
214 JobEventDetails(Type type, PrintedDocument* document, PrintedPage* page); | 214 JobEventDetails(Type type, |
| 215 int job_id, |
| 216 PrintedDocument* document, |
| 217 PrintedPage* page); |
215 | 218 |
216 // Getters. | 219 // Getters. |
217 PrintedDocument* document() const; | 220 PrintedDocument* document() const; |
218 PrintedPage* page() const; | 221 PrintedPage* page() const; |
219 Type type() const { | 222 Type type() const { |
220 return type_; | 223 return type_; |
221 } | 224 } |
| 225 int job_id() const { return job_id_; } |
222 | 226 |
223 private: | 227 private: |
224 friend class base::RefCountedThreadSafe<JobEventDetails>; | 228 friend class base::RefCountedThreadSafe<JobEventDetails>; |
225 | 229 |
226 ~JobEventDetails(); | 230 ~JobEventDetails(); |
227 | 231 |
228 scoped_refptr<PrintedDocument> document_; | 232 scoped_refptr<PrintedDocument> document_; |
229 scoped_refptr<PrintedPage> page_; | 233 scoped_refptr<PrintedPage> page_; |
230 const Type type_; | 234 const Type type_; |
| 235 int job_id_; |
231 | 236 |
232 DISALLOW_COPY_AND_ASSIGN(JobEventDetails); | 237 DISALLOW_COPY_AND_ASSIGN(JobEventDetails); |
233 }; | 238 }; |
234 | 239 |
235 } // namespace printing | 240 } // namespace printing |
236 | 241 |
237 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_H_ | 242 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_H_ |
OLD | NEW |