OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
6 #define CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
| 11 #include <vector> |
11 | 12 |
12 #include "base/file_path.h" | 13 #include "base/file_path.h" |
13 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
14 #include "base/message_loop_proxy.h" | 15 #include "base/message_loop_proxy.h" |
15 #include "base/thread.h" | 16 #include "base/thread.h" |
16 #include "base/time.h" | 17 #include "base/time.h" |
17 #include "chrome/service/cloud_print/cloud_print_url_fetcher.h" | 18 #include "chrome/service/cloud_print/cloud_print_url_fetcher.h" |
18 #include "chrome/service/cloud_print/job_status_updater.h" | 19 #include "chrome/service/cloud_print/job_status_updater.h" |
19 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
20 #include "net/url_request/url_request_status.h" | 21 #include "net/url_request/url_request_status.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 JOB_DOWNLOAD_FAILED, | 71 JOB_DOWNLOAD_FAILED, |
71 INVALID_JOB_DATA, | 72 INVALID_JOB_DATA, |
72 PRINT_FAILED, | 73 PRINT_FAILED, |
73 }; | 74 }; |
74 struct JobDetails { | 75 struct JobDetails { |
75 std::string job_id_; | 76 std::string job_id_; |
76 std::string job_title_; | 77 std::string job_title_; |
77 std::string print_ticket_; | 78 std::string print_ticket_; |
78 FilePath print_data_file_path_; | 79 FilePath print_data_file_path_; |
79 std::string print_data_mime_type_; | 80 std::string print_data_mime_type_; |
| 81 std::vector<std::string> tags_; |
80 void Clear() { | 82 void Clear() { |
81 job_id_.clear(); | 83 job_id_.clear(); |
82 job_title_.clear(); | 84 job_title_.clear(); |
83 print_ticket_.clear(); | 85 print_ticket_.clear(); |
84 print_data_mime_type_.clear(); | 86 print_data_mime_type_.clear(); |
85 print_data_file_path_ = FilePath(); | 87 print_data_file_path_ = FilePath(); |
| 88 tags_.clear(); |
86 } | 89 } |
87 }; | 90 }; |
88 | 91 |
89 public: | 92 public: |
90 class Delegate { | 93 class Delegate { |
91 public: | 94 public: |
92 virtual void OnPrinterJobHandlerShutdown( | 95 virtual void OnPrinterJobHandlerShutdown( |
93 PrinterJobHandler* job_handler, const std::string& printer_id) = 0; | 96 PrinterJobHandler* job_handler, const std::string& printer_id) = 0; |
94 virtual void OnAuthError() = 0; | 97 virtual void OnAuthError() = 0; |
95 | 98 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); | 289 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); |
287 }; | 290 }; |
288 | 291 |
289 // This typedef is to workaround the issue with certain versions of | 292 // This typedef is to workaround the issue with certain versions of |
290 // Visual Studio where it gets confused between multiple Delegate | 293 // Visual Studio where it gets confused between multiple Delegate |
291 // classes and gives a C2500 error. (I saw this error on the try bots - | 294 // classes and gives a C2500 error. (I saw this error on the try bots - |
292 // the workaround was not needed for my machine). | 295 // the workaround was not needed for my machine). |
293 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; | 296 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; |
294 | 297 |
295 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 298 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
OLD | NEW |