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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <objidl.h> | 9 #include <objidl.h> |
10 #include <winspool.h> | 10 #include <winspool.h> |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 static HANDLE NullHandle() { | 37 static HANDLE NullHandle() { |
38 return NULL; | 38 return NULL; |
39 } | 39 } |
40 | 40 |
41 private: | 41 private: |
42 DISALLOW_IMPLICIT_CONSTRUCTORS(PrinterHandleTraits); | 42 DISALLOW_IMPLICIT_CONSTRUCTORS(PrinterHandleTraits); |
43 }; | 43 }; |
44 | 44 |
45 typedef base::win::GenericScopedHandle< | 45 typedef base::win::GenericScopedHandle< |
46 PrinterHandleTraits, base::win::VerifierTraits> ScopedPrinterHandle; | 46 PrinterHandleTraits, base::win::DummyVerifierTraits> ScopedPrinterHandle; |
| 47 |
47 | 48 |
48 // Wrapper class to wrap the XPS APIs (PTxxx APIs). This is needed because these | 49 // Wrapper class to wrap the XPS APIs (PTxxx APIs). This is needed because these |
49 // APIs are not available by default on XP. We could delayload prntvpt.dll but | 50 // APIs are not available by default on XP. We could delayload prntvpt.dll but |
50 // this would mean having to add that to every binary that links with | 51 // this would mean having to add that to every binary that links with |
51 // printing.lib (which is a LOT of binaries). So choosing the GetProcAddress | 52 // printing.lib (which is a LOT of binaries). So choosing the GetProcAddress |
52 // route instead). | 53 // route instead). |
53 class PRINTING_EXPORT XPSModule { | 54 class PRINTING_EXPORT XPSModule { |
54 public: | 55 public: |
55 // All the other methods can ONLY be called after a successful call to Init. | 56 // All the other methods can ONLY be called after a successful call to Init. |
56 // Init can be called many times and by multiple threads. | 57 // Init can be called many times and by multiple threads. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 }; | 127 }; |
127 | 128 |
128 PRINTING_EXPORT bool InitBasicPrinterInfo(HANDLE printer, | 129 PRINTING_EXPORT bool InitBasicPrinterInfo(HANDLE printer, |
129 PrinterBasicInfo* printer_info); | 130 PrinterBasicInfo* printer_info); |
130 | 131 |
131 PRINTING_EXPORT std::string GetDriverInfo(HANDLE printer); | 132 PRINTING_EXPORT std::string GetDriverInfo(HANDLE printer); |
132 | 133 |
133 } // namespace printing | 134 } // namespace printing |
134 | 135 |
135 #endif // PRINTING_BACKEND_WIN_HELPER_H_ | 136 #endif // PRINTING_BACKEND_WIN_HELPER_H_ |
OLD | NEW |