Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: printing/backend/printing_info_win.h

Issue 168003002: Use DocumentProperties to get default DEVMODE instead of PRINTER_INFO_*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/backend/print_backend_win.cc ('k') | printing/backend/printing_info_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PRINTING_INFO_WIN_H_ 5 #ifndef PRINTING_BACKEND_PRINTING_INFO_WIN_H_
6 #define PRINTING_BACKEND_PRINTING_INFO_WIN_H_ 6 #define PRINTING_BACKEND_PRINTING_INFO_WIN_H_
7 7
8 #include <objidl.h> 8 #include <objidl.h>
9 #include <winspool.h> 9 #include <winspool.h>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 private: 53 private:
54 scoped_ptr<uint8[]> buffer_; 54 scoped_ptr<uint8[]> buffer_;
55 }; 55 };
56 56
57 } // namespace internal 57 } // namespace internal
58 58
59 typedef internal::PrinterInfo<PRINTER_INFO_2, 2> PrinterInfo2; 59 typedef internal::PrinterInfo<PRINTER_INFO_2, 2> PrinterInfo2;
60 typedef internal::PrinterInfo<PRINTER_INFO_5, 5> PrinterInfo5; 60 typedef internal::PrinterInfo<PRINTER_INFO_5, 5> PrinterInfo5;
61 typedef internal::PrinterInfo<PRINTER_INFO_8, 8> PrinterInfo8;
62 typedef internal::PrinterInfo<PRINTER_INFO_9, 9> PrinterInfo9;
63 61
64 typedef internal::DriverInfo<DRIVER_INFO_6, 6> DriverInfo6; 62 typedef internal::DriverInfo<DRIVER_INFO_6, 6> DriverInfo6;
65 63
66 // Retrieves DEVMODE from PRINTER_INFO_* structures.
67 // Requests in following order:
68 // 9 (user-default),
69 // 8 (admin-default),
70 // 2 (printer-default).
71 class PRINTING_EXPORT UserDefaultDevMode {
72 public:
73 UserDefaultDevMode();
74 ~UserDefaultDevMode();
75
76 bool Init(HANDLE printer);
77
78 const DEVMODE* get() const {
79 return dev_mode_;
80 }
81
82 private:
83 PrinterInfo2 info_2_;
84 PrinterInfo8 info_8_;
85 PrinterInfo9 info_9_;
86 const DEVMODE* dev_mode_;
87 };
88
89 } // namespace printing 64 } // namespace printing
90 65
91 #endif // PRINTING_BACKEND_PRINTING_INFO_WIN_H_ 66 #endif // PRINTING_BACKEND_PRINTING_INFO_WIN_H_
OLDNEW
« no previous file with comments | « printing/backend/print_backend_win.cc ('k') | printing/backend/printing_info_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698