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

Side by Side Diff: printing/printed_document.h

Issue 335473002: Guarded shrink setting with ifdefs to make clear where it is used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Thu 06/12/2014 0:59:45.49 Created 6 years, 6 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 | « chrome/renderer/printing/print_web_view_helper_pdf_win.cc ('k') | printing/printed_document.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 #ifndef PRINTING_PRINTED_DOCUMENT_H_ 5 #ifndef PRINTING_PRINTED_DOCUMENT_H_
6 #define PRINTING_PRINTED_DOCUMENT_H_ 6 #define PRINTING_PRINTED_DOCUMENT_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 24 matching lines...) Expand all
35 : public base::RefCountedThreadSafe<PrintedDocument> { 35 : public base::RefCountedThreadSafe<PrintedDocument> {
36 public: 36 public:
37 // The cookie shall be unique and has a specific relationship with its 37 // The cookie shall be unique and has a specific relationship with its
38 // originating source and settings. 38 // originating source and settings.
39 PrintedDocument(const PrintSettings& settings, 39 PrintedDocument(const PrintSettings& settings,
40 PrintedPagesSource* source, 40 PrintedPagesSource* source,
41 int cookie); 41 int cookie);
42 42
43 // Sets a page's data. 0-based. Takes metafile ownership. 43 // Sets a page's data. 0-based. Takes metafile ownership.
44 // Note: locks for a short amount of time. 44 // Note: locks for a short amount of time.
45 void SetPage(int page_number, Metafile* metafile, double shrink, 45 void SetPage(int page_number,
46 const gfx::Size& paper_size, const gfx::Rect& page_rect); 46 Metafile* metafile,
47 #if defined(OS_WIN)
48 double shrink,
49 #endif // OS_WIN
50 const gfx::Size& paper_size,
51 const gfx::Rect& page_rect);
47 52
48 // Retrieves a page. If the page is not available right now, it 53 // Retrieves a page. If the page is not available right now, it
49 // requests to have this page be rendered and returns false. 54 // requests to have this page be rendered and returns false.
50 // Note: locks for a short amount of time. 55 // Note: locks for a short amount of time.
51 bool GetPage(int page_number, scoped_refptr<PrintedPage>* page); 56 bool GetPage(int page_number, scoped_refptr<PrintedPage>* page);
52 57
53 // Draws the page in the context. 58 // Draws the page in the context.
54 // Note: locks for a short amount of time in debug only. 59 // Note: locks for a short amount of time in debug only.
55 #if defined(OS_WIN) || defined(OS_MACOSX) && !defined(USE_AURA) 60 #if defined(OS_WIN) || defined(OS_MACOSX) && !defined(USE_AURA)
56 void RenderPrintedPage(const PrintedPage& page, 61 void RenderPrintedPage(const PrintedPage& page,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 176
172 // All the immutable members. 177 // All the immutable members.
173 const Immutable immutable_; 178 const Immutable immutable_;
174 179
175 DISALLOW_COPY_AND_ASSIGN(PrintedDocument); 180 DISALLOW_COPY_AND_ASSIGN(PrintedDocument);
176 }; 181 };
177 182
178 } // namespace printing 183 } // namespace printing
179 184
180 #endif // PRINTING_PRINTED_DOCUMENT_H_ 185 #endif // PRINTING_PRINTED_DOCUMENT_H_
OLDNEW
« no previous file with comments | « chrome/renderer/printing/print_web_view_helper_pdf_win.cc ('k') | printing/printed_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698