| 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_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ |
| 6 #define CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 | |
| 15 #include "printing/backend/print_backend.h" | 14 #include "printing/backend/print_backend.h" |
| 16 | 15 |
| 17 class FilePath; | |
| 18 | |
| 19 namespace base { | 16 namespace base { |
| 20 class DictionaryValue; | 17 class DictionaryValue; |
| 18 class FilePath; |
| 21 } | 19 } |
| 22 | 20 |
| 23 namespace printing { | 21 namespace printing { |
| 24 struct PrinterBasicInfo; | 22 struct PrinterBasicInfo; |
| 25 struct PrinterCapsAndDefaults; | 23 struct PrinterCapsAndDefaults; |
| 26 } | 24 } |
| 27 | 25 |
| 28 // This is the interface for platform-specific code for cloud print | 26 // This is the interface for platform-specific code for cloud print |
| 29 namespace cloud_print { | 27 namespace cloud_print { |
| 30 | 28 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 122 |
| 125 protected: | 123 protected: |
| 126 virtual ~Delegate() {} | 124 virtual ~Delegate() {} |
| 127 }; | 125 }; |
| 128 | 126 |
| 129 // Spool job to the printer asynchronously. Caller will be notified via | 127 // Spool job to the printer asynchronously. Caller will be notified via |
| 130 // |delegate|. Note that only one print job can be in progress at any given | 128 // |delegate|. Note that only one print job can be in progress at any given |
| 131 // time. Subsequent calls to Spool (before the Delegate::OnJobSpoolSucceeded | 129 // time. Subsequent calls to Spool (before the Delegate::OnJobSpoolSucceeded |
| 132 // or Delegate::OnJobSpoolFailed methods are called) can fail. | 130 // or Delegate::OnJobSpoolFailed methods are called) can fail. |
| 133 virtual bool Spool(const std::string& print_ticket, | 131 virtual bool Spool(const std::string& print_ticket, |
| 134 const FilePath& print_data_file_path, | 132 const base::FilePath& print_data_file_path, |
| 135 const std::string& print_data_mime_type, | 133 const std::string& print_data_mime_type, |
| 136 const std::string& printer_name, | 134 const std::string& printer_name, |
| 137 const std::string& job_title, | 135 const std::string& job_title, |
| 138 const std::vector<std::string>& tags, | 136 const std::vector<std::string>& tags, |
| 139 JobSpooler::Delegate* delegate) = 0; | 137 JobSpooler::Delegate* delegate) = 0; |
| 140 protected: | 138 protected: |
| 141 friend class base::RefCountedThreadSafe<JobSpooler>; | 139 friend class base::RefCountedThreadSafe<JobSpooler>; |
| 142 virtual ~JobSpooler(); | 140 virtual ~JobSpooler(); |
| 143 }; | 141 }; |
| 144 | 142 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 // Visual Studio where it gets confused between multiple Delegate | 215 // Visual Studio where it gets confused between multiple Delegate |
| 218 // classes and gives a C2500 error. (I saw this error on the try bots - | 216 // classes and gives a C2500 error. (I saw this error on the try bots - |
| 219 // the workaround was not needed for my machine). | 217 // the workaround was not needed for my machine). |
| 220 typedef PrintSystem::PrintServerWatcher::Delegate PrintServerWatcherDelegate; | 218 typedef PrintSystem::PrintServerWatcher::Delegate PrintServerWatcherDelegate; |
| 221 typedef PrintSystem::PrinterWatcher::Delegate PrinterWatcherDelegate; | 219 typedef PrintSystem::PrinterWatcher::Delegate PrinterWatcherDelegate; |
| 222 typedef PrintSystem::JobSpooler::Delegate JobSpoolerDelegate; | 220 typedef PrintSystem::JobSpooler::Delegate JobSpoolerDelegate; |
| 223 | 221 |
| 224 } // namespace cloud_print | 222 } // namespace cloud_print |
| 225 | 223 |
| 226 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ | 224 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ |
| OLD | NEW |