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> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 std::string print_data_mime_type_; | 84 std::string print_data_mime_type_; |
85 std::vector<std::string> tags_; | 85 std::vector<std::string> tags_; |
86 }; | 86 }; |
87 | 87 |
88 public: | 88 public: |
89 class Delegate { | 89 class Delegate { |
90 public: | 90 public: |
91 virtual void OnPrinterJobHandlerShutdown( | 91 virtual void OnPrinterJobHandlerShutdown( |
92 PrinterJobHandler* job_handler, const std::string& printer_id) = 0; | 92 PrinterJobHandler* job_handler, const std::string& printer_id) = 0; |
93 virtual void OnAuthError() = 0; | 93 virtual void OnAuthError() = 0; |
| 94 // Called when the PrinterJobHandler cannot find the printer locally. The |
| 95 // delegate returns |delete_from_server| to true if the printer should be |
| 96 // deleted from the server,false otherwise. |
| 97 virtual void OnPrinterNotFound(const std::string& printer_name, |
| 98 bool* delete_from_server) = 0; |
94 | 99 |
95 protected: | 100 protected: |
96 virtual ~Delegate() {} | 101 virtual ~Delegate() {} |
97 }; | 102 }; |
98 | 103 |
99 struct PrinterInfoFromCloud { | 104 struct PrinterInfoFromCloud { |
100 std::string printer_id; | 105 std::string printer_id; |
101 std::string caps_hash; | 106 std::string caps_hash; |
102 std::string tags_hash; | 107 std::string tags_hash; |
103 }; | 108 }; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); | 296 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); |
292 }; | 297 }; |
293 | 298 |
294 // This typedef is to workaround the issue with certain versions of | 299 // This typedef is to workaround the issue with certain versions of |
295 // Visual Studio where it gets confused between multiple Delegate | 300 // Visual Studio where it gets confused between multiple Delegate |
296 // classes and gives a C2500 error. (I saw this error on the try bots - | 301 // classes and gives a C2500 error. (I saw this error on the try bots - |
297 // the workaround was not needed for my machine). | 302 // the workaround was not needed for my machine). |
298 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; | 303 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; |
299 | 304 |
300 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 305 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
OLD | NEW |