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

Side by Side Diff: chrome/browser/printing/printed_page.h

Issue 149212: Move printing related stuff to the root printing project from the browser pro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PRINTING_PRINTED_PAGE_H__
6 #define CHROME_BROWSER_PRINTING_PRINTED_PAGE_H__
7
8 #include "base/gfx/rect.h"
9 #include "base/gfx/size.h"
10 #include "base/ref_counted.h"
11 #include "base/scoped_ptr.h"
12 #include "printing/native_metafile.h"
13
14 namespace printing {
15
16 // Contains the data to reproduce a printed page, either on screen or on
17 // paper. Once created, this object is immutable. It has no reference to the
18 // PrintedDocument containing this page.
19 // Note: May be accessed from many threads at the same time. This is an non
20 // issue since this object is immutable. The reason is that a page may be
21 // printed and be displayed at the same time.
22 class PrintedPage : public base::RefCountedThreadSafe<PrintedPage> {
23 public:
24 PrintedPage(int page_number,
25 NativeMetafile* native_metafile,
26 const gfx::Size& page_size);
27 ~PrintedPage();
28
29 // Getters
30 int page_number() const { return page_number_; }
31 const NativeMetafile* native_metafile() const;
32 const gfx::Size& page_size() const { return page_size_; }
33
34 private:
35 // Page number inside the printed document.
36 const int page_number_;
37
38 // Actual paint data.
39 const scoped_ptr<NativeMetafile> native_metafile_;
40
41 // The physical page size. To support multiple page formats inside on print
42 // job.
43 const gfx::Size page_size_;
44
45 DISALLOW_EVIL_CONSTRUCTORS(PrintedPage);
46 };
47
48 } // namespace printing
49
50 #endif // CHROME_BROWSER_PRINTING_PRINTED_PAGE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698