| 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 #include "chrome/service/cloud_print/print_system.h" | 5 #include "chrome/service/cloud_print/print_system.h" |
| 6 | 6 |
| 7 #include <objidl.h> | 7 #include <objidl.h> |
| 8 #include <winspool.h> | 8 #include <winspool.h> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 class JobSpoolerWin : public PrintSystem::JobSpooler { | 342 class JobSpoolerWin : public PrintSystem::JobSpooler { |
| 343 public: | 343 public: |
| 344 JobSpoolerWin() : core_(new Core) {} | 344 JobSpoolerWin() : core_(new Core) {} |
| 345 // PrintSystem::JobSpooler implementation. | 345 // PrintSystem::JobSpooler implementation. |
| 346 virtual bool Spool(const std::string& print_ticket, | 346 virtual bool Spool(const std::string& print_ticket, |
| 347 const FilePath& print_data_file_path, | 347 const FilePath& print_data_file_path, |
| 348 const std::string& print_data_mime_type, | 348 const std::string& print_data_mime_type, |
| 349 const std::string& printer_name, | 349 const std::string& printer_name, |
| 350 const std::string& job_title, | 350 const std::string& job_title, |
| 351 const std::vector<std::string>& tags, |
| 351 JobSpooler::Delegate* delegate) { | 352 JobSpooler::Delegate* delegate) { |
| 353 // TODO(gene): add tags handling. |
| 352 return core_->Spool(print_ticket, print_data_file_path, | 354 return core_->Spool(print_ticket, print_data_file_path, |
| 353 print_data_mime_type, printer_name, job_title, | 355 print_data_mime_type, printer_name, job_title, |
| 354 delegate); | 356 delegate); |
| 355 } | 357 } |
| 356 private: | 358 private: |
| 357 // We use a Core class because we want a separate RefCountedThreadSafe | 359 // We use a Core class because we want a separate RefCountedThreadSafe |
| 358 // implementation for ServiceUtilityProcessHost::Client. | 360 // implementation for ServiceUtilityProcessHost::Client. |
| 359 class Core : public ServiceUtilityProcessHost::Client { | 361 class Core : public ServiceUtilityProcessHost::Client { |
| 360 public: | 362 public: |
| 361 Core() | 363 Core() |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 RpcStringFree(reinterpret_cast<RPC_WSTR *>(&proxy_id_as_string)); | 657 RpcStringFree(reinterpret_cast<RPC_WSTR *>(&proxy_id_as_string)); |
| 656 return ret; | 658 return ret; |
| 657 } | 659 } |
| 658 | 660 |
| 659 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( | 661 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( |
| 660 const DictionaryValue* print_system_settings) { | 662 const DictionaryValue* print_system_settings) { |
| 661 return new PrintSystemWin; | 663 return new PrintSystemWin; |
| 662 } | 664 } |
| 663 | 665 |
| 664 } // namespace cloud_print | 666 } // namespace cloud_print |
| OLD | NEW |