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 PRINTING_BACKEND_WIN_HELPER_H_ | 5 #ifndef PRINTING_BACKEND_WIN_HELPER_H_ |
6 #define PRINTING_BACKEND_WIN_HELPER_H_ | 6 #define PRINTING_BACKEND_WIN_HELPER_H_ |
7 | 7 |
8 #include <objidl.h> | 8 #include <objidl.h> |
9 #include <winspool.h> | 9 #include <winspool.h> |
10 #include <prntvpt.h> | 10 #include <prntvpt.h> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Wrapper class to wrap the XPS APIs (PTxxx APIs). This is needed because these | 65 // Wrapper class to wrap the XPS APIs (PTxxx APIs). This is needed because these |
66 // APIs are not available by default on XP. We could delayload prntvpt.dll but | 66 // APIs are not available by default on XP. We could delayload prntvpt.dll but |
67 // this would mean having to add that to every binary that links with | 67 // this would mean having to add that to every binary that links with |
68 // printing.lib (which is a LOT of binaries). So choosing the GetProcAddress | 68 // printing.lib (which is a LOT of binaries). So choosing the GetProcAddress |
69 // route instead). | 69 // route instead). |
70 class PRINTING_EXPORT XPSModule { | 70 class PRINTING_EXPORT XPSModule { |
71 public: | 71 public: |
72 // All the other methods can ONLY be called after a successful call to Init. | 72 // All the other methods can ONLY be called after a successful call to Init. |
73 // Init can be called many times and by multiple threads. | 73 // Init can be called many times and by multiple threads. |
74 static bool Init(); | 74 static bool Init(); |
75 static HRESULT OpenProvider(const string16& printer_name, | 75 static HRESULT OpenProvider(const base::string16& printer_name, |
76 DWORD version, | 76 DWORD version, |
77 HPTPROVIDER* provider); | 77 HPTPROVIDER* provider); |
78 static HRESULT GetPrintCapabilities(HPTPROVIDER provider, | 78 static HRESULT GetPrintCapabilities(HPTPROVIDER provider, |
79 IStream* print_ticket, | 79 IStream* print_ticket, |
80 IStream* capabilities, | 80 IStream* capabilities, |
81 BSTR* error_message); | 81 BSTR* error_message); |
82 static HRESULT ConvertDevModeToPrintTicket(HPTPROVIDER provider, | 82 static HRESULT ConvertDevModeToPrintTicket(HPTPROVIDER provider, |
83 ULONG devmode_size_in_bytes, | 83 ULONG devmode_size_in_bytes, |
84 PDEVMODE devmode, | 84 PDEVMODE devmode, |
85 EPrintTicketScope scope, | 85 EPrintTicketScope scope, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 }; | 143 }; |
144 | 144 |
145 PRINTING_EXPORT bool InitBasicPrinterInfo(HANDLE printer, | 145 PRINTING_EXPORT bool InitBasicPrinterInfo(HANDLE printer, |
146 PrinterBasicInfo* printer_info); | 146 PrinterBasicInfo* printer_info); |
147 | 147 |
148 PRINTING_EXPORT std::string GetDriverInfo(HANDLE printer); | 148 PRINTING_EXPORT std::string GetDriverInfo(HANDLE printer); |
149 | 149 |
150 } // namespace printing | 150 } // namespace printing |
151 | 151 |
152 #endif // PRINTING_BACKEND_WIN_HELPER_H_ | 152 #endif // PRINTING_BACKEND_WIN_HELPER_H_ |
OLD | NEW |