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 #include "chrome/service/cloud_print/print_system.h" | 5 #include "chrome/service/cloud_print/print_system.h" |
6 | 6 |
7 #include <objidl.h> | 7 #include <objidl.h> |
8 #include <winspool.h> | 8 #include <winspool.h> |
9 #include <xpsprint.h> | 9 #include <xpsprint.h> |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } | 48 } |
49 | 49 |
50 static HANDLE NullHandle() { | 50 static HANDLE NullHandle() { |
51 return NULL; | 51 return NULL; |
52 } | 52 } |
53 | 53 |
54 private: | 54 private: |
55 DISALLOW_IMPLICIT_CONSTRUCTORS(PrinterChangeHandleTraits); | 55 DISALLOW_IMPLICIT_CONSTRUCTORS(PrinterChangeHandleTraits); |
56 }; | 56 }; |
57 | 57 |
58 typedef base::win::GenericScopedHandle<PrinterChangeHandleTraits> | 58 typedef base::win::GenericScopedHandle<PrinterChangeHandleTraits, |
| 59 base::win::DummyVerifierTraits> |
59 ScopedPrinterChangeHandle; | 60 ScopedPrinterChangeHandle; |
60 | 61 |
61 class DevMode { | 62 class DevMode { |
62 public: | 63 public: |
63 DevMode() : dm_(NULL) {} | 64 DevMode() : dm_(NULL) {} |
64 ~DevMode() { Free(); } | 65 ~DevMode() { Free(); } |
65 | 66 |
66 void Allocate(int size) { | 67 void Allocate(int size) { |
67 Free(); | 68 Free(); |
68 dm_ = reinterpret_cast<DEVMODE*>(new char[size]); | 69 dm_ = reinterpret_cast<DEVMODE*>(new char[size]); |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 RpcStringFree(reinterpret_cast<RPC_WSTR *>(&proxy_id_as_string)); | 900 RpcStringFree(reinterpret_cast<RPC_WSTR *>(&proxy_id_as_string)); |
900 return ret; | 901 return ret; |
901 } | 902 } |
902 | 903 |
903 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( | 904 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( |
904 const base::DictionaryValue* print_system_settings) { | 905 const base::DictionaryValue* print_system_settings) { |
905 return new PrintSystemWin; | 906 return new PrintSystemWin; |
906 } | 907 } |
907 | 908 |
908 } // namespace cloud_print | 909 } // namespace cloud_print |
OLD | NEW |