| 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 <prntvpt.h> |
| 9 #include <winspool.h> | 10 #include <winspool.h> |
| 10 #include <prntvpt.h> | |
| 11 #include <xpsprint.h> | 11 #include <xpsprint.h> |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 17 #include "base/win/scoped_handle.h" | 17 #include "base/win/scoped_handle.h" |
| 18 #include "printing/printing_export.h" | 18 #include "printing/printing_export.h" |
| 19 | 19 |
| 20 // These are helper functions for dealing with Windows Printing. | 20 // These are helper functions for dealing with Windows Printing. |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 private: | 163 private: |
| 164 XPSPrintModule() { } | 164 XPSPrintModule() { } |
| 165 static bool InitImpl(); | 165 static bool InitImpl(); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 PRINTING_EXPORT bool InitBasicPrinterInfo(HANDLE printer, | 168 PRINTING_EXPORT bool InitBasicPrinterInfo(HANDLE printer, |
| 169 PrinterBasicInfo* printer_info); | 169 PrinterBasicInfo* printer_info); |
| 170 | 170 |
| 171 PRINTING_EXPORT std::string GetDriverInfo(HANDLE printer); | 171 PRINTING_EXPORT std::string GetDriverInfo(HANDLE printer); |
| 172 | 172 |
| 173 PRINTING_EXPORT scoped_ptr<DEVMODE[]> XpsTicketToDevMode( | 173 PRINTING_EXPORT scoped_ptr<DEVMODE, base::FreeDeleter> XpsTicketToDevMode( |
| 174 const base::string16& printer_name, | 174 const base::string16& printer_name, |
| 175 const std::string& print_ticket); | 175 const std::string& print_ticket); |
| 176 | 176 |
| 177 // Creates default DEVMODE and sets color option. Some devices need special | 177 // Creates default DEVMODE and sets color option. Some devices need special |
| 178 // workaround for color. | 178 // workaround for color. |
| 179 PRINTING_EXPORT scoped_ptr<DEVMODE[]> CreateDevModeWithColor( | 179 PRINTING_EXPORT scoped_ptr<DEVMODE, base::FreeDeleter> CreateDevModeWithColor( |
| 180 HANDLE printer, | 180 HANDLE printer, |
| 181 const base::string16& printer_name, | 181 const base::string16& printer_name, |
| 182 bool color); | 182 bool color); |
| 183 | 183 |
| 184 // Creates new DEVMODE. If |in| is not NULL copy settings from there. | 184 // Creates new DEVMODE. If |in| is not NULL copy settings from there. |
| 185 PRINTING_EXPORT scoped_ptr<DEVMODE[]> CreateDevMode(HANDLE printer, | 185 PRINTING_EXPORT scoped_ptr<DEVMODE, base::FreeDeleter> CreateDevMode( |
| 186 DEVMODE* in); | 186 HANDLE printer, |
| 187 DEVMODE* in); |
| 187 | 188 |
| 188 } // namespace printing | 189 } // namespace printing |
| 189 | 190 |
| 190 #endif // PRINTING_BACKEND_WIN_HELPER_H_ | 191 #endif // PRINTING_BACKEND_WIN_HELPER_H_ |
| OLD | NEW |