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

Side by Side Diff: printing/printed_document_mac.cc

Issue 8334007: Cleanup: Remove unneeded namespaces. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « printing/print_settings_initializer.cc ('k') | printing/printed_document_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) 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/printed_document.h" 5 #include "printing/printed_document.h"
6 6
7 #import <ApplicationServices/ApplicationServices.h> 7 #import <ApplicationServices/ApplicationServices.h>
8 #import <CoreFoundation/CoreFoundation.h> 8 #import <CoreFoundation/CoreFoundation.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "printing/page_number.h" 11 #include "printing/page_number.h"
12 #include "printing/printed_page.h" 12 #include "printing/printed_page.h"
13 13
14 namespace printing { 14 namespace printing {
15 15
16 void PrintedDocument::RenderPrintedPage( 16 void PrintedDocument::RenderPrintedPage(
17 const PrintedPage& page, gfx::NativeDrawingContext context) const { 17 const PrintedPage& page, gfx::NativeDrawingContext context) const {
18 #ifndef NDEBUG 18 #ifndef NDEBUG
19 { 19 {
20 // Make sure the page is from our list. 20 // Make sure the page is from our list.
21 base::AutoLock lock(lock_); 21 base::AutoLock lock(lock_);
22 DCHECK(&page == mutable_.pages_.find(page.page_number() - 1)->second.get()); 22 DCHECK(&page == mutable_.pages_.find(page.page_number() - 1)->second.get());
23 } 23 }
24 #endif 24 #endif
25 25
26 DCHECK(context); 26 DCHECK(context);
27 27
28 const printing::PageSetup& page_setup( 28 const PageSetup& page_setup(immutable_.settings_.page_setup_device_units());
29 immutable_.settings_.page_setup_device_units());
30 gfx::Rect content_area; 29 gfx::Rect content_area;
31 page.GetCenteredPageContentRect(page_setup.physical_size(), &content_area); 30 page.GetCenteredPageContentRect(page_setup.physical_size(), &content_area);
32 31
33 const printing::Metafile* metafile = page.metafile(); 32 const Metafile* metafile = page.metafile();
34 // Each Metafile is a one-page PDF, and pages use 1-based indexing. 33 // Each Metafile is a one-page PDF, and pages use 1-based indexing.
35 const int page_number = 1; 34 const int page_number = 1;
36 metafile->RenderPage(page_number, context, content_area.ToCGRect(), 35 metafile->RenderPage(page_number, context, content_area.ToCGRect(),
37 false, false, false, false); 36 false, false, false, false);
38 } 37 }
39 38
40 } // namespace printing 39 } // namespace printing
OLDNEW
« no previous file with comments | « printing/print_settings_initializer.cc ('k') | printing/printed_document_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698