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

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

Issue 10453082: Base: Add a handle verifier to ScopedHandle. (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
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 24 matching lines...) Expand all
35 } 35 }
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<PrinterHandleTraits> ScopedPrinterHandle; 45 typedef base::win::GenericScopedHandle<
46 PrinterHandleTraits, base::win::DummyVerifierTraits> ScopedPrinterHandle;
46 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.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698