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

Side by Side Diff: chrome/renderer/mock_printer.cc

Issue 15836003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 #include "chrome/renderer/mock_printer.h" 5 #include "chrome/renderer/mock_printer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 244
245 int MockPrinter::GetPrintedPages() const { 245 int MockPrinter::GetPrintedPages() const {
246 if (printer_status_ != PRINTER_READY) 246 if (printer_status_ != PRINTER_READY)
247 return -1; 247 return -1;
248 return page_number_; 248 return page_number_;
249 } 249 }
250 250
251 const MockPrinterPage* MockPrinter::GetPrintedPage(unsigned int pageno) const { 251 const MockPrinterPage* MockPrinter::GetPrintedPage(unsigned int pageno) const {
252 if (pages_.size() > pageno) 252 if (pages_.size() > pageno)
253 return pages_[pageno]; 253 return pages_[pageno].get();
254 else 254 else
255 return NULL; 255 return NULL;
256 } 256 }
257 257
258 int MockPrinter::GetWidth(unsigned int page) const { 258 int MockPrinter::GetWidth(unsigned int page) const {
259 if (printer_status_ != PRINTER_READY || page >= pages_.size()) 259 if (printer_status_ != PRINTER_READY || page >= pages_.size())
260 return -1; 260 return -1;
261 return pages_[page]->width(); 261 return pages_[page]->width();
262 } 262 }
263 263
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 params->margin_top = margin_top_; 314 params->margin_top = margin_top_;
315 params->is_first_request = is_first_request_; 315 params->is_first_request = is_first_request_;
316 params->print_scaling_option = print_scaling_option_; 316 params->print_scaling_option = print_scaling_option_;
317 params->print_to_pdf = print_to_pdf_; 317 params->print_to_pdf = print_to_pdf_;
318 params->preview_request_id = preview_request_id_; 318 params->preview_request_id = preview_request_id_;
319 params->display_header_footer = display_header_footer_; 319 params->display_header_footer = display_header_footer_;
320 params->date = date_; 320 params->date = date_;
321 params->title = title_; 321 params->title = title_;
322 params->url = url_; 322 params->url = url_;
323 } 323 }
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc ('k') | chrome/renderer/pepper/ppb_pdf_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698