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