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

Side by Side Diff: printing/image_mac.cc

Issue 5270010: Revert 67662 - FBTF: Remove unneeded headers from base/ (part 10)... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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/image.cc ('k') | printing/image_win.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/image.h" 5 #include "printing/image.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 8
9 #include "base/logging.h"
10 #include "base/mac/scoped_cftyperef.h" 9 #include "base/mac/scoped_cftyperef.h"
11 #include "gfx/rect.h" 10 #include "gfx/rect.h"
12 11
13 namespace printing { 12 namespace printing {
14 13
15 bool Image::LoadMetafile(const NativeMetafile& metafile) { 14 bool Image::LoadMetafile(const NativeMetafile& metafile) {
16 // The printing system uses single-page metafiles (page indexes are 1-based). 15 // The printing system uses single-page metafiles (page indexes are 1-based).
17 const unsigned int page_number = 1; 16 const unsigned int page_number = 1;
18 gfx::Rect rect(metafile.GetPageBounds(page_number)); 17 gfx::Rect rect(metafile.GetPageBounds(page_number));
19 if (rect.width() < 1 || rect.height() < 1) 18 if (rect.width() < 1 || rect.height() < 1)
(...skipping 14 matching lines...) Expand all
34 DCHECK(bitmap_context.get()); 33 DCHECK(bitmap_context.get());
35 34
36 metafile.RenderPage(page_number, bitmap_context, 35 metafile.RenderPage(page_number, bitmap_context,
37 CGRectMake(0, 0, size_.width(), size_.height()), 36 CGRectMake(0, 0, size_.width(), size_.height()),
38 true, false, false, false); 37 true, false, false, false);
39 38
40 return true; 39 return true;
41 } 40 }
42 41
43 } // namespace printing 42 } // namespace printing
OLDNEW
« no previous file with comments | « printing/image.cc ('k') | printing/image_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698