diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 17:28:53 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 17:28:53 +0000 |
commit | d85a45c07147317e9dcbc075629a24d200863c05 (patch) | |
tree | 34afda300349040ebf24b3814f5f29011323167d /printing | |
parent | a5a3689b36825d4b24e92f90d338b8eac43a5435 (diff) | |
download | chromium_src-d85a45c07147317e9dcbc075629a24d200863c05.zip chromium_src-d85a45c07147317e9dcbc075629a24d200863c05.tar.gz chromium_src-d85a45c07147317e9dcbc075629a24d200863c05.tar.bz2 |
Add OVERRIDE to printing/.
BUG=104314
TEST=no change
Review URL: http://codereview.chromium.org/8468031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110317 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r-- | printing/backend/print_backend_cups.cc | 11 | ||||
-rw-r--r-- | printing/emf_win.h | 32 | ||||
-rw-r--r-- | printing/pdf_metafile_cg_mac.h | 27 | ||||
-rw-r--r-- | printing/pdf_metafile_skia.h | 36 | ||||
-rw-r--r-- | printing/printing_context_gtk.h | 22 | ||||
-rw-r--r-- | printing/printing_context_mac.h | 22 |
6 files changed, 78 insertions, 72 deletions
diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc index 8d30328..ad0b0c9 100644 --- a/printing/backend/print_backend_cups.cc +++ b/printing/backend/print_backend_cups.cc @@ -97,14 +97,15 @@ class PrintBackendCUPS : public PrintBackend { virtual ~PrintBackendCUPS() {} // PrintBackend implementation. - virtual bool EnumeratePrinters(PrinterList* printer_list); + virtual bool EnumeratePrinters(PrinterList* printer_list) OVERRIDE; - virtual std::string GetDefaultPrinterName(); + virtual std::string GetDefaultPrinterName() OVERRIDE; - virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name, - PrinterCapsAndDefaults* printer_info); + virtual bool GetPrinterCapsAndDefaults( + const std::string& printer_name, + PrinterCapsAndDefaults* printer_info) OVERRIDE; - virtual bool IsValidPrinter(const std::string& printer_name); + virtual bool IsValidPrinter(const std::string& printer_name) OVERRIDE; private: // Following functions are wrappers around corresponding CUPS functions. diff --git a/printing/emf_win.h b/printing/emf_win.h index 1d10687..8317627 100644 --- a/printing/emf_win.h +++ b/printing/emf_win.h @@ -10,6 +10,7 @@ #include <vector> #include "base/basictypes.h" +#include "base/compiler_specific.h" #include "base/gtest_prod_util.h" #include "printing/metafile.h" @@ -42,45 +43,46 @@ class PRINTING_EXPORT Emf : public Metafile { virtual bool InitFromFile(const FilePath& metafile_path); // Metafile methods. - virtual bool Init(); - virtual bool InitFromData(const void* src_buffer, uint32 src_buffer_size); + virtual bool Init() OVERRIDE; + virtual bool InitFromData(const void* src_buffer, + uint32 src_buffer_size) OVERRIDE; virtual SkDevice* StartPageForVectorCanvas( const gfx::Size& page_size, const gfx::Rect& content_area, - const float& scale_factor); + const float& scale_factor) OVERRIDE; // 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. |page_size|, |content_area|, and |scale_factor| are // ignored. virtual bool StartPage(const gfx::Size& page_size, const gfx::Rect& content_area, - const float& scale_factor); - virtual bool FinishPage(); - virtual bool FinishDocument(); + const float& scale_factor) OVERRIDE; + virtual bool FinishPage() OVERRIDE; + virtual bool FinishDocument() OVERRIDE; - virtual uint32 GetDataSize() const; - virtual bool GetData(void* buffer, uint32 size) const; + virtual uint32 GetDataSize() const OVERRIDE; + virtual bool GetData(void* buffer, uint32 size) const OVERRIDE; // Saves the EMF data to a file as-is. It is recommended to use the .emf file // extension but it is not enforced. This function synchronously writes to the // file. For testing only. - virtual bool SaveTo(const FilePath& file_path) const; + virtual bool SaveTo(const FilePath& file_path) const OVERRIDE; // Should be passed to Playback to keep the exact same size. - virtual gfx::Rect GetPageBounds(unsigned int page_number) const; + virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE; - virtual unsigned int GetPageCount() const { + virtual unsigned int GetPageCount() const OVERRIDE { return page_count_; } - virtual HDC context() const { + virtual HDC context() const OVERRIDE { return hdc_; } - virtual bool Playback(HDC hdc, const RECT* rect) const; - virtual bool SafePlayback(HDC hdc) const; + virtual bool Playback(HDC hdc, const RECT* rect) const OVERRIDE; + virtual bool SafePlayback(HDC hdc) const OVERRIDE; - virtual HENHMETAFILE emf() const { + virtual HENHMETAFILE emf() const OVERRIDE { return emf_; } diff --git a/printing/pdf_metafile_cg_mac.h b/printing/pdf_metafile_cg_mac.h index f6fcd26..3ffb40d 100644 --- a/printing/pdf_metafile_cg_mac.h +++ b/printing/pdf_metafile_cg_mac.h @@ -30,31 +30,32 @@ class PRINTING_EXPORT PdfMetafileCg : public Metafile { virtual ~PdfMetafileCg(); // Metafile methods. - virtual bool Init(); - virtual bool InitFromData(const void* src_buffer, uint32 src_buffer_size); + virtual bool Init() OVERRIDE; + virtual bool InitFromData(const void* src_buffer, + uint32 src_buffer_size) OVERRIDE; // Not implemented on mac. virtual SkDevice* StartPageForVectorCanvas( const gfx::Size& page_size, const gfx::Rect& content_area, - const float& scale_factor); + const float& scale_factor) OVERRIDE; virtual bool StartPage(const gfx::Size& page_size, const gfx::Rect& content_area, - const float& scale_factor); - virtual bool FinishPage(); - virtual bool FinishDocument(); + const float& scale_factor) OVERRIDE; + virtual bool FinishPage() OVERRIDE; + virtual bool FinishDocument() OVERRIDE; - virtual uint32 GetDataSize() const; - virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const; + virtual uint32 GetDataSize() const OVERRIDE; + virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const OVERRIDE; // For testing purposes only. - virtual bool SaveTo(const FilePath& file_path) const; + virtual bool SaveTo(const FilePath& file_path) const OVERRIDE; - virtual gfx::Rect GetPageBounds(unsigned int page_number) const; - virtual unsigned int GetPageCount() const; + virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE; + virtual unsigned int GetPageCount() const OVERRIDE; // Note: The returned context *must not be retained* past Close(). If it is, // the data returned from GetData will not be valid PDF data. - virtual CGContextRef context() const; + virtual CGContextRef context() const OVERRIDE; virtual bool RenderPage(unsigned int page_number, CGContextRef context, @@ -62,7 +63,7 @@ class PRINTING_EXPORT PdfMetafileCg : public Metafile { bool shrink_to_fit, bool stretch_to_fit, bool center_horizontally, - bool center_vertically) const; + bool center_vertically) const OVERRIDE; private: // Returns a CGPDFDocumentRef version of pdf_data_. diff --git a/printing/pdf_metafile_skia.h b/printing/pdf_metafile_skia.h index 4a20c17..64aecc0 100644 --- a/printing/pdf_metafile_skia.h +++ b/printing/pdf_metafile_skia.h @@ -26,34 +26,36 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile { virtual ~PdfMetafileSkia(); // Metafile methods. - virtual bool Init(); - virtual bool InitFromData(const void* src_buffer, uint32 src_buffer_size); + virtual bool Init() OVERRIDE; + virtual bool InitFromData(const void* src_buffer, + uint32 src_buffer_size) OVERRIDE; virtual SkDevice* StartPageForVectorCanvas( const gfx::Size& page_size, const gfx::Rect& content_area, - const float& scale_factor); + const float& scale_factor) OVERRIDE; virtual bool StartPage(const gfx::Size& page_size, const gfx::Rect& content_area, - const float& scale_factor); - virtual bool FinishPage(); - virtual bool FinishDocument(); + const float& scale_factor) OVERRIDE; + virtual bool FinishPage() OVERRIDE; + virtual bool FinishDocument() OVERRIDE; - virtual uint32 GetDataSize() const; - virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const; + virtual uint32 GetDataSize() const OVERRIDE; + virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const OVERRIDE; - virtual bool SaveTo(const FilePath& file_path) const; + virtual bool SaveTo(const FilePath& file_path) const OVERRIDE; - virtual gfx::Rect GetPageBounds(unsigned int page_number) const; - virtual unsigned int GetPageCount() const; + virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE; + virtual unsigned int GetPageCount() const OVERRIDE; - virtual gfx::NativeDrawingContext context() const; + virtual gfx::NativeDrawingContext context() const OVERRIDE; #if defined(OS_WIN) - virtual bool Playback(gfx::NativeDrawingContext hdc, const RECT* rect) const; - virtual bool SafePlayback(gfx::NativeDrawingContext hdc) const; - virtual HENHMETAFILE emf() const; + virtual bool Playback(gfx::NativeDrawingContext hdc, + const RECT* rect) const OVERRIDE; + virtual bool SafePlayback(gfx::NativeDrawingContext hdc) const OVERRIDE; + virtual HENHMETAFILE emf() const OVERRIDE; #elif defined(OS_MACOSX) virtual bool RenderPage(unsigned int page_number, CGContextRef context, @@ -61,11 +63,11 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile { bool shrink_to_fit, bool stretch_to_fit, bool center_horizontally, - bool center_vertically) const; + bool center_vertically) const OVERRIDE; #endif #if defined(OS_CHROMEOS) - virtual bool SaveToFD(const base::FileDescriptor& fd) const; + virtual bool SaveToFD(const base::FileDescriptor& fd) const OVERRIDE; #endif // if defined(OS_CHROMEOS) // Return a new metafile containing just the current page in draft mode. diff --git a/printing/printing_context_gtk.h b/printing/printing_context_gtk.h index 2dddd43..dbb8941 100644 --- a/printing/printing_context_gtk.h +++ b/printing/printing_context_gtk.h @@ -35,19 +35,19 @@ class PRINTING_EXPORT PrintingContextGtk : public PrintingContext { virtual void AskUserForSettings(gfx::NativeView parent_view, int max_pages, bool has_selection, - PrintSettingsCallback* callback); - virtual Result UseDefaultSettings(); + PrintSettingsCallback* callback) OVERRIDE; + virtual Result UseDefaultSettings() OVERRIDE; virtual Result UpdatePrinterSettings( const base::DictionaryValue& job_settings, - const PageRanges& ranges); - virtual Result InitWithSettings(const PrintSettings& settings); - virtual Result NewDocument(const string16& document_name); - virtual Result NewPage(); - virtual Result PageDone(); - virtual Result DocumentDone(); - virtual void Cancel(); - virtual void ReleaseContext(); - virtual gfx::NativeDrawingContext context() const; + const PageRanges& ranges) OVERRIDE; + virtual Result InitWithSettings(const PrintSettings& settings) OVERRIDE; + virtual Result NewDocument(const string16& document_name) OVERRIDE; + virtual Result NewPage() OVERRIDE; + virtual Result PageDone() OVERRIDE; + virtual Result DocumentDone() OVERRIDE; + virtual void Cancel() OVERRIDE; + virtual void ReleaseContext() OVERRIDE; + virtual gfx::NativeDrawingContext context() const OVERRIDE; private: string16 document_name_; diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h index 160fdfd..e44c118 100644 --- a/printing/printing_context_mac.h +++ b/printing/printing_context_mac.h @@ -28,19 +28,19 @@ class PRINTING_EXPORT PrintingContextMac : public PrintingContext { virtual void AskUserForSettings(gfx::NativeView parent_view, int max_pages, bool has_selection, - PrintSettingsCallback* callback); - virtual Result UseDefaultSettings(); + PrintSettingsCallback* callback) OVERRIDE; + virtual Result UseDefaultSettings() OVERRIDE; virtual Result UpdatePrinterSettings( const base::DictionaryValue& job_settings, - const PageRanges& ranges); - virtual Result InitWithSettings(const PrintSettings& settings); - virtual Result NewDocument(const string16& document_name); - virtual Result NewPage(); - virtual Result PageDone(); - virtual Result DocumentDone(); - virtual void Cancel(); - virtual void ReleaseContext(); - virtual gfx::NativeDrawingContext context() const; + const PageRanges& ranges) OVERRIDE; + virtual Result InitWithSettings(const PrintSettings& settings) OVERRIDE; + virtual Result NewDocument(const string16& document_name) OVERRIDE; + virtual Result NewPage() OVERRIDE; + virtual Result PageDone() OVERRIDE; + virtual Result DocumentDone() OVERRIDE; + virtual void Cancel() OVERRIDE; + virtual void ReleaseContext() OVERRIDE; + virtual gfx::NativeDrawingContext context() const OVERRIDE; private: // Initializes PrintSettings from |print_info_|. This must be called |