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

Side by Side Diff: printing/emf_win.cc

Issue 7549001: PrintPreview: Remove |page_number| from StartPageForVectorCanvas function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nit Created 9 years, 4 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
« no previous file with comments | « printing/emf_win.h ('k') | printing/metafile.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/emf_win.h" 5 #include "printing/emf_win.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 397 }
398 default: { 398 default: {
399 res = Play(); 399 res = Play();
400 break; 400 break;
401 } 401 }
402 } 402 }
403 return res; 403 return res;
404 } 404 }
405 405
406 SkDevice* Emf::StartPageForVectorCanvas( 406 SkDevice* Emf::StartPageForVectorCanvas(
407 int page_number, const gfx::Size& page_size, const gfx::Rect& content_area, 407 const gfx::Size& page_size, const gfx::Rect& content_area,
408 const float& scale_factor) { 408 const float& scale_factor) {
409 DCHECK(page_number == page_count_);
410 if (!StartPage(page_size, content_area, scale_factor)) 409 if (!StartPage(page_size, content_area, scale_factor))
411 return NULL; 410 return NULL;
412 411
413 return skia::VectorPlatformDeviceEmf::CreateDevice(page_size.width(), 412 return skia::VectorPlatformDeviceEmf::CreateDevice(page_size.width(),
414 page_size.height(), 413 page_size.height(),
415 true, hdc_); 414 true, hdc_);
416 } 415 }
417 416
418 bool Emf::StartPage(const gfx::Size& /*page_size*/, 417 bool Emf::StartPage(const gfx::Size& /*page_size*/,
419 const gfx::Rect& /*content_area*/, 418 const gfx::Rect& /*content_area*/,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } else { 474 } else {
476 DCHECK_EQ(emf.context_.handle_table, handle_table); 475 DCHECK_EQ(emf.context_.handle_table, handle_table);
477 DCHECK_EQ(emf.context_.objects_count, objects_count); 476 DCHECK_EQ(emf.context_.objects_count, objects_count);
478 DCHECK_EQ(emf.context_.hdc, hdc); 477 DCHECK_EQ(emf.context_.hdc, hdc);
479 } 478 }
480 emf.items_.push_back(Record(&emf.context_, record)); 479 emf.items_.push_back(Record(&emf.context_, record));
481 return 1; 480 return 1;
482 } 481 }
483 482
484 } // namespace printing 483 } // namespace printing
OLDNEW
« no previous file with comments | « printing/emf_win.h ('k') | printing/metafile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698