diff options
author | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 17:52:23 +0000 |
---|---|---|
committer | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 17:52:23 +0000 |
commit | edc531f9ec270823787167f70c4c8c1ad45de146 (patch) | |
tree | 32bd3b45f3a93a4f060c82eda8d9c6a669bbd0ee /printing/native_metafile.h | |
parent | 3e7b5d650e797a288c51e6a74d4595dc0e555d0b (diff) | |
download | chromium_src-edc531f9ec270823787167f70c4c8c1ad45de146.zip chromium_src-edc531f9ec270823787167f70c4c8c1ad45de146.tar.gz chromium_src-edc531f9ec270823787167f70c4c8c1ad45de146.tar.bz2 |
Unifying StartPage across all platforms
Since there is already a getter method for retrieving the context, there is no reason for StartPage to return it. Also the parameter list can be uniform across all platforms. Some arguments are unused in order to achieve this.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/6667069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78717 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/native_metafile.h')
-rw-r--r-- | printing/native_metafile.h | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/printing/native_metafile.h b/printing/native_metafile.h index a076b32..5981bf5 100644 --- a/printing/native_metafile.h +++ b/printing/native_metafile.h @@ -21,9 +21,9 @@ class FilePath; namespace gfx { +class Point; class Rect; class Size; -class Point; } #if defined(OS_CHROMEOS) @@ -50,26 +50,12 @@ class NativeMetafile { // Note: It should only be called from within the browser process. virtual bool InitFromData(const void* src_buffer, uint32 src_buffer_size) = 0; -#if defined(OS_WIN) - // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls - // (since StartPage and EndPage do not work in a metafile DC). Only valid - // when hdc_ is non-NULL. - virtual bool StartPage() = 0; -#elif defined(OS_MACOSX) - // Prepares a new pdf page at specified |content_origin| with the given - // |page_size| and a |scale_factor| to use for the drawing. - virtual gfx::NativeDrawingContext StartPage(const gfx::Size& page_size, - const gfx::Point& content_origin, - const float& scale_factor) = 0; -#elif defined(OS_POSIX) - // Prepares a new cairo surface/context for rendering a new page. - // The unit is in point (=1/72 in). - // Returns NULL when failed. - virtual gfx::NativeDrawingContext StartPage(const gfx::Size& page_size, - double margin_top_in_points, - double margin_left_in_points) = 0; -#endif - + // Prepares a context for rendering a new page at the specified + // |content_origin| with the given |page_size| and a |scale_factor| to use for + // the drawing. The units are in points (=1/72 in). Returns true on success. + virtual bool StartPage(const gfx::Size& page_size, + const gfx::Point& content_origin, + const float& scale_factor) = 0; // Closes the current page and destroys the context used in rendering that // page. The results of current page will be appended into the underlying |