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

Side by Side Diff: chrome/browser/printing/print_job.cc

Issue 641923002: Change PDF scaling factor from double to float. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years, 2 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 | « chrome/browser/printing/print_job.h ('k') | chrome/common/chrome_utility_printing_messages.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 "chrome/browser/printing/print_job.h" 5 #include "chrome/browser/printing/print_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 ptd_to_emf_state_.reset(); 287 ptd_to_emf_state_.reset();
288 Cancel(); 288 Cancel();
289 return; 289 return;
290 } 290 }
291 ptd_to_emf_state_->set_page_count(page_count); 291 ptd_to_emf_state_->set_page_count(page_count);
292 ptd_to_emf_state_->GetMorePages( 292 ptd_to_emf_state_->GetMorePages(
293 base::Bind(&PrintJob::OnPdfToEmfPageConverted, this)); 293 base::Bind(&PrintJob::OnPdfToEmfPageConverted, this));
294 } 294 }
295 295
296 void PrintJob::OnPdfToEmfPageConverted(int page_number, 296 void PrintJob::OnPdfToEmfPageConverted(int page_number,
297 double scale_factor, 297 float scale_factor,
298 scoped_ptr<MetafilePlayer> emf) { 298 scoped_ptr<MetafilePlayer> emf) {
299 DCHECK(ptd_to_emf_state_); 299 DCHECK(ptd_to_emf_state_);
300 if (!document_.get() || !emf) { 300 if (!document_.get() || !emf) {
301 ptd_to_emf_state_.reset(); 301 ptd_to_emf_state_.reset();
302 Cancel(); 302 Cancel();
303 return; 303 return;
304 } 304 }
305 305
306 // Update the rendered document. It will send notifications to the listener. 306 // Update the rendered document. It will send notifications to the listener.
307 document_->SetPage(page_number, 307 document_->SetPage(page_number,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 453 }
454 454
455 JobEventDetails::~JobEventDetails() { 455 JobEventDetails::~JobEventDetails() {
456 } 456 }
457 457
458 PrintedDocument* JobEventDetails::document() const { return document_.get(); } 458 PrintedDocument* JobEventDetails::document() const { return document_.get(); }
459 459
460 PrintedPage* JobEventDetails::page() const { return page_.get(); } 460 PrintedPage* JobEventDetails::page() const { return page_.get(); }
461 461
462 } // namespace printing 462 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_job.h ('k') | chrome/common/chrome_utility_printing_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698