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 true if the printer should be deleted from the server, | |
96 // false otherwise. | |
97 virtual bool OnPrinterNotFound(const std::string& printer_name) = 0; | |
gene1
2011/01/24 19:46:47
OK, after reading the comment, I understand what O
sanjeevr
2011/01/24 19:59:05
But the check is not HasCompletePrinterInfo. The n
| |
94 | 98 |
95 protected: | 99 protected: |
96 virtual ~Delegate() {} | 100 virtual ~Delegate() {} |
97 }; | 101 }; |
98 | 102 |
99 struct PrinterInfoFromCloud { | 103 struct PrinterInfoFromCloud { |
100 std::string printer_id; | 104 std::string printer_id; |
101 std::string caps_hash; | 105 std::string caps_hash; |
102 std::string tags_hash; | 106 std::string tags_hash; |
103 }; | 107 }; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
291 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); | 295 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); |
292 }; | 296 }; |
293 | 297 |
294 // This typedef is to workaround the issue with certain versions of | 298 // This typedef is to workaround the issue with certain versions of |
295 // Visual Studio where it gets confused between multiple Delegate | 299 // Visual Studio where it gets confused between multiple Delegate |
296 // classes and gives a C2500 error. (I saw this error on the try bots - | 300 // classes and gives a C2500 error. (I saw this error on the try bots - |
297 // the workaround was not needed for my machine). | 301 // the workaround was not needed for my machine). |
298 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; | 302 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; |
299 | 303 |
300 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 304 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
OLD | NEW |