diff options
Diffstat (limited to 'chrome/service')
-rw-r--r-- | chrome/service/cloud_print/print_system_xps_win.cc | 22 | ||||
-rw-r--r-- | chrome/service/service_utility_process_host.cc | 6 | ||||
-rw-r--r-- | chrome/service/service_utility_process_host.h | 8 |
3 files changed, 14 insertions, 22 deletions
diff --git a/chrome/service/cloud_print/print_system_xps_win.cc b/chrome/service/cloud_print/print_system_xps_win.cc index 5fc722d..30c04bf 100644 --- a/chrome/service/cloud_print/print_system_xps_win.cc +++ b/chrome/service/cloud_print/print_system_xps_win.cc @@ -428,21 +428,15 @@ class PrinterCapsHandler : public ServiceUtilityProcessHost::Client { // ServiceUtilityProcessHost::Client implementation. virtual void OnChildDied() OVERRIDE { - OnGetPrinterCapsAndDefaultsFailed(printer_name_); + OnGetPrinterCapsAndDefaults(false, printer_name_, + printing::PrinterCapsAndDefaults()); } - virtual void OnGetPrinterCapsAndDefaultsSucceeded( + virtual void OnGetPrinterCapsAndDefaults( + bool succeeded, const std::string& printer_name, const printing::PrinterCapsAndDefaults& caps_and_defaults) OVERRIDE { - callback_.Run(true, printer_name, caps_and_defaults); - callback_.Reset(); - Release(); - } - - virtual void OnGetPrinterCapsAndDefaultsFailed( - const std::string& printer_name) OVERRIDE { - printing::PrinterCapsAndDefaults caps_and_defaults; - callback_.Run(false, printer_name, caps_and_defaults); + callback_.Run(succeeded, printer_name, caps_and_defaults); callback_.Reset(); Release(); } @@ -469,8 +463,7 @@ class PrinterCapsHandler : public ServiceUtilityProcessHost::Client { } else { client_message_loop_proxy->PostTask( FROM_HERE, - base::Bind(&PrinterCapsHandler::OnGetPrinterCapsAndDefaultsFailed, - this, printer_name_)); + base::Bind(&PrinterCapsHandler::OnChildDied, this)); } } @@ -485,14 +478,17 @@ class PrintSystemWinXPS : public PrintSystemWin { // PrintSystem implementation. virtual PrintSystemResult Init() OVERRIDE; + virtual void GetPrinterCapsAndDefaults( const std::string& printer_name, const PrinterCapsAndDefaultsCallback& callback) OVERRIDE; + virtual bool PrintSystemWinXPS::ValidatePrintTicket( const std::string& printer_name, const std::string& print_ticket_data) OVERRIDE; virtual PrintSystem::JobSpooler* CreateJobSpooler() OVERRIDE; + virtual std::string GetSupportedMimeTypes() OVERRIDE; private: diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc index 2b4e310..8825fab 100644 --- a/chrome/service/service_utility_process_host.cc +++ b/chrome/service/service_utility_process_host.cc @@ -287,7 +287,7 @@ void ServiceUtilityProcessHost::OnGetPrinterCapsAndDefaultsSucceeded( waiting_for_reply_ = false; client_message_loop_proxy_->PostTask( FROM_HERE, - base::Bind(&Client::OnGetPrinterCapsAndDefaultsSucceeded, client_.get(), + base::Bind(&Client::OnGetPrinterCapsAndDefaults, client_.get(), true, printer_name, caps_and_defaults)); } @@ -302,8 +302,8 @@ void ServiceUtilityProcessHost::OnGetPrinterCapsAndDefaultsFailed( waiting_for_reply_ = false; client_message_loop_proxy_->PostTask( FROM_HERE, - base::Bind(&Client::OnGetPrinterCapsAndDefaultsFailed, client_.get(), - printer_name)); + base::Bind(&Client::OnGetPrinterCapsAndDefaults, client_.get(), false, + printer_name, printing::PrinterCapsAndDefaults())); } void ServiceUtilityProcessHost::Client::MetafileAvailable( diff --git a/chrome/service/service_utility_process_host.h b/chrome/service/service_utility_process_host.h index 1e41066..81c3051 100644 --- a/chrome/service/service_utility_process_host.h +++ b/chrome/service/service_utility_process_host.h @@ -62,15 +62,11 @@ class ServiceUtilityProcessHost : public content::ChildProcessHostDelegate { // Called when the printer capabilities and defaults have been // retrieved successfully. - virtual void OnGetPrinterCapsAndDefaultsSucceeded( + virtual void OnGetPrinterCapsAndDefaults( + bool succedded, const std::string& printer_name, const printing::PrinterCapsAndDefaults& caps_and_defaults) {} - // Called when the printer capabilities and defaults could not be - // retrieved successfully. - virtual void OnGetPrinterCapsAndDefaultsFailed( - const std::string& printer_name) {} - protected: virtual ~Client() {} |