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

Side by Side Diff: printing/backend/print_backend_win.cc

Issue 1101023002: Update {virtual,override} to follow C++11 style in printing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | printing/emf_win.h » ('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 #include "printing/backend/print_backend.h" 5 #include "printing/backend/print_backend.h"
6 6
7 #include <objidl.h> 7 #include <objidl.h>
8 #include <winspool.h> 8 #include <winspool.h>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 } 151 }
152 152
153 } // namespace 153 } // namespace
154 154
155 class PrintBackendWin : public PrintBackend { 155 class PrintBackendWin : public PrintBackend {
156 public: 156 public:
157 PrintBackendWin() {} 157 PrintBackendWin() {}
158 158
159 // PrintBackend implementation. 159 // PrintBackend implementation.
160 virtual bool EnumeratePrinters(PrinterList* printer_list) override; 160 bool EnumeratePrinters(PrinterList* printer_list) override;
161 virtual std::string GetDefaultPrinterName() override; 161 std::string GetDefaultPrinterName() override;
162 virtual bool GetPrinterSemanticCapsAndDefaults( 162 bool GetPrinterSemanticCapsAndDefaults(
163 const std::string& printer_name, 163 const std::string& printer_name,
164 PrinterSemanticCapsAndDefaults* printer_info) override; 164 PrinterSemanticCapsAndDefaults* printer_info) override;
165 virtual bool GetPrinterCapsAndDefaults( 165 bool GetPrinterCapsAndDefaults(
166 const std::string& printer_name, 166 const std::string& printer_name,
167 PrinterCapsAndDefaults* printer_info) override; 167 PrinterCapsAndDefaults* printer_info) override;
168 virtual std::string GetPrinterDriverInfo( 168 std::string GetPrinterDriverInfo(
169 const std::string& printer_name) override; 169 const std::string& printer_name) override;
170 virtual bool IsValidPrinter(const std::string& printer_name) override; 170 bool IsValidPrinter(const std::string& printer_name) override;
171 171
172 protected: 172 protected:
173 virtual ~PrintBackendWin() {} 173 ~PrintBackendWin() override {}
174 }; 174 };
175 175
176 bool PrintBackendWin::EnumeratePrinters(PrinterList* printer_list) { 176 bool PrintBackendWin::EnumeratePrinters(PrinterList* printer_list) {
177 DCHECK(printer_list); 177 DCHECK(printer_list);
178 DWORD bytes_needed = 0; 178 DWORD bytes_needed = 0;
179 DWORD count_returned = 0; 179 DWORD count_returned = 0;
180 const DWORD kLevel = 4; 180 const DWORD kLevel = 4;
181 BOOL ret = EnumPrinters(PRINTER_ENUM_LOCAL|PRINTER_ENUM_CONNECTIONS, NULL, 181 BOOL ret = EnumPrinters(PRINTER_ENUM_LOCAL|PRINTER_ENUM_CONNECTIONS, NULL,
182 kLevel, NULL, 0, &bytes_needed, &count_returned); 182 kLevel, NULL, 0, &bytes_needed, &count_returned);
183 if (!bytes_needed) 183 if (!bytes_needed)
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 ScopedPrinterHandle printer_handle; 360 ScopedPrinterHandle printer_handle;
361 return printer_handle.OpenPrinter(base::UTF8ToWide(printer_name).c_str()); 361 return printer_handle.OpenPrinter(base::UTF8ToWide(printer_name).c_str());
362 } 362 }
363 363
364 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( 364 scoped_refptr<PrintBackend> PrintBackend::CreateInstance(
365 const base::DictionaryValue* print_backend_settings) { 365 const base::DictionaryValue* print_backend_settings) {
366 return new PrintBackendWin; 366 return new PrintBackendWin;
367 } 367 }
368 368
369 } // namespace printing 369 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | printing/emf_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698