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

Side by Side Diff: printing/emf_win.h

Issue 628133002: Replacing the OVERRIDE with override and FINAL with final in /src/printing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | printing/emf_win_unittest.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_EMF_WIN_H_ 5 #ifndef PRINTING_EMF_WIN_H_
6 #define PRINTING_EMF_WIN_H_ 6 #define PRINTING_EMF_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void Close(); 47 void Close();
48 48
49 // Generates a new metafile that will record every GDI command, and will 49 // Generates a new metafile that will record every GDI command, and will
50 // be saved to |metafile_path|. 50 // be saved to |metafile_path|.
51 bool InitToFile(const base::FilePath& metafile_path); 51 bool InitToFile(const base::FilePath& metafile_path);
52 52
53 // Initializes the Emf with the data in |metafile_path|. 53 // Initializes the Emf with the data in |metafile_path|.
54 bool InitFromFile(const base::FilePath& metafile_path); 54 bool InitFromFile(const base::FilePath& metafile_path);
55 55
56 // Metafile methods. 56 // Metafile methods.
57 virtual bool Init() OVERRIDE; 57 virtual bool Init() override;
58 virtual bool InitFromData(const void* src_buffer, 58 virtual bool InitFromData(const void* src_buffer,
59 uint32 src_buffer_size) OVERRIDE; 59 uint32 src_buffer_size) override;
60 60
61 virtual SkBaseDevice* StartPageForVectorCanvas( 61 virtual SkBaseDevice* StartPageForVectorCanvas(
62 const gfx::Size& page_size, const gfx::Rect& content_area, 62 const gfx::Size& page_size, const gfx::Rect& content_area,
63 const float& scale_factor) OVERRIDE; 63 const float& scale_factor) override;
64 // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls 64 // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls
65 // (since StartPage and EndPage do not work in a metafile DC). Only valid 65 // (since StartPage and EndPage do not work in a metafile DC). Only valid
66 // when hdc_ is non-NULL. |page_size|, |content_area|, and |scale_factor| are 66 // when hdc_ is non-NULL. |page_size|, |content_area|, and |scale_factor| are
67 // ignored. 67 // ignored.
68 virtual bool StartPage(const gfx::Size& page_size, 68 virtual bool StartPage(const gfx::Size& page_size,
69 const gfx::Rect& content_area, 69 const gfx::Rect& content_area,
70 const float& scale_factor) OVERRIDE; 70 const float& scale_factor) override;
71 virtual bool FinishPage() OVERRIDE; 71 virtual bool FinishPage() override;
72 virtual bool FinishDocument() OVERRIDE; 72 virtual bool FinishDocument() override;
73 73
74 virtual uint32 GetDataSize() const OVERRIDE; 74 virtual uint32 GetDataSize() const override;
75 virtual bool GetData(void* buffer, uint32 size) const OVERRIDE; 75 virtual bool GetData(void* buffer, uint32 size) const override;
76 76
77 // Should be passed to Playback to keep the exact same size. 77 // Should be passed to Playback to keep the exact same size.
78 virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE; 78 virtual gfx::Rect GetPageBounds(unsigned int page_number) const override;
79 79
80 virtual unsigned int GetPageCount() const OVERRIDE { return 1; } 80 virtual unsigned int GetPageCount() const override { return 1; }
81 81
82 virtual HDC context() const OVERRIDE { 82 virtual HDC context() const override {
83 return hdc_; 83 return hdc_;
84 } 84 }
85 85
86 virtual bool Playback(HDC hdc, const RECT* rect) const OVERRIDE; 86 virtual bool Playback(HDC hdc, const RECT* rect) const override;
87 virtual bool SafePlayback(HDC hdc) const OVERRIDE; 87 virtual bool SafePlayback(HDC hdc) const override;
88 88
89 HENHMETAFILE emf() const { return emf_; } 89 HENHMETAFILE emf() const { return emf_; }
90 90
91 // Returns true if metafile contains alpha blend. 91 // Returns true if metafile contains alpha blend.
92 bool IsAlphaBlendUsed() const; 92 bool IsAlphaBlendUsed() const;
93 93
94 // Returns new metafile with only bitmap created by playback of the current 94 // Returns new metafile with only bitmap created by playback of the current
95 // metafile. Returns NULL if fails. 95 // metafile. Returns NULL if fails.
96 scoped_ptr<Emf> RasterizeMetafile(int raster_area_in_pixels) const; 96 scoped_ptr<Emf> RasterizeMetafile(int raster_area_in_pixels) const;
97 97
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 std::vector<Record> items_; 188 std::vector<Record> items_;
189 189
190 EnumerationContext context_; 190 EnumerationContext context_;
191 191
192 DISALLOW_COPY_AND_ASSIGN(Enumerator); 192 DISALLOW_COPY_AND_ASSIGN(Enumerator);
193 }; 193 };
194 194
195 } // namespace printing 195 } // namespace printing
196 196
197 #endif // PRINTING_EMF_WIN_H_ 197 #endif // PRINTING_EMF_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | printing/emf_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698