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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 | « chrome/nacl/nacl_listener.cc ('k') | chrome/renderer/pepper/ppb_pdf_impl.cc » ('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 "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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 237
238 int MockPrinter::GetPrintedPages() const { 238 int MockPrinter::GetPrintedPages() const {
239 if (printer_status_ != PRINTER_READY) 239 if (printer_status_ != PRINTER_READY)
240 return -1; 240 return -1;
241 return page_number_; 241 return page_number_;
242 } 242 }
243 243
244 const MockPrinterPage* MockPrinter::GetPrintedPage(unsigned int pageno) const { 244 const MockPrinterPage* MockPrinter::GetPrintedPage(unsigned int pageno) const {
245 if (pages_.size() > pageno) 245 if (pages_.size() > pageno)
246 return pages_[pageno]; 246 return pages_[pageno].get();
247 else 247 else
248 return NULL; 248 return NULL;
249 } 249 }
250 250
251 int MockPrinter::GetWidth(unsigned int page) const { 251 int MockPrinter::GetWidth(unsigned int page) const {
252 if (printer_status_ != PRINTER_READY || page >= pages_.size()) 252 if (printer_status_ != PRINTER_READY || page >= pages_.size())
253 return -1; 253 return -1;
254 return pages_[page]->width(); 254 return pages_[page]->width();
255 } 255 }
256 256
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 params->margin_top = margin_top_; 306 params->margin_top = margin_top_;
307 params->is_first_request = is_first_request_; 307 params->is_first_request = is_first_request_;
308 params->print_scaling_option = print_scaling_option_; 308 params->print_scaling_option = print_scaling_option_;
309 params->print_to_pdf = print_to_pdf_; 309 params->print_to_pdf = print_to_pdf_;
310 params->preview_request_id = preview_request_id_; 310 params->preview_request_id = preview_request_id_;
311 params->display_header_footer = display_header_footer_; 311 params->display_header_footer = display_header_footer_;
312 params->date = date_; 312 params->date = date_;
313 params->title = title_; 313 params->title = title_;
314 params->url = url_; 314 params->url = url_;
315 } 315 }
OLDNEW
« no previous file with comments | « chrome/nacl/nacl_listener.cc ('k') | chrome/renderer/pepper/ppb_pdf_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698