Chromium Code Reviews| Index: chrome/service/service_utility_process_host.h |
| =================================================================== |
| --- chrome/service/service_utility_process_host.h (revision 69496) |
| +++ chrome/service/service_utility_process_host.h (working copy) |
| @@ -12,6 +12,7 @@ |
| #include <windows.h> |
| #endif // defined(OS_WIN) |
| +#include <string> |
| #include <vector> |
| #include "base/basictypes.h" |
| @@ -35,6 +36,7 @@ |
| namespace printing { |
| struct PageRange; |
| +struct PrinterCapsAndDefaults; |
| } // namespace printing |
| // Acts as the service-side host to a utility child process. A |
| @@ -60,6 +62,17 @@ |
| // Called when no page in the passed in PDF could be rendered. |
| virtual void OnRenderPDFPagesToMetafileFailed() {} |
| + // Called when the printer capabilities and defaults have been |
| + // retrieved successfully. |
| + virtual void OnGetPrinterCapsAndDefaultsSucceeded( |
| + 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() {} |
| @@ -88,6 +101,12 @@ |
| int render_dpi, |
| const std::vector<printing::PageRange>& page_ranges); |
| + // Starta a process to get capabilities and defaults for the specified |
|
Scott Byer
2010/12/20 21:02:29
nit: spelling
sanjeevr
2010/12/21 21:28:45
Done.
|
| + // printer. Used on Windows to isolate the service process from printer driver |
| + // crashes by executing this in a separate process. The process does not run |
| + // in a sandbox. |
| + bool StartGetPrinterCapsAndDefaults(const std::string& printer_name); |
| + |
| protected: |
| // Allows this method to be overridden for tests. |
| virtual FilePath GetUtilityProcessCmd(); |
| @@ -98,7 +117,7 @@ |
| private: |
| // Starts a process. Returns true iff it succeeded. |
| - bool StartProcess(const FilePath& exposed_dir); |
| + bool StartProcess(bool no_sandbox, const FilePath& exposed_dir); |
| // IPC messages: |
| virtual void OnMessageReceived(const IPC::Message& message); |