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

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

Issue 10516004: Reland 139885 - Enable the handle verifier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « base/win/scoped_handle.h ('k') | no next file » | 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_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
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
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_
OLDNEW
« no previous file with comments | « base/win/scoped_handle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698