Commit bc76161f authored by nick's avatar nick Committed by Commit bot

Update {virtual,override} to follow C++11 style in printing.

The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override.

This patch was manually generated using a regex and a text editor.

BUG=417463

Review URL: https://codereview.chromium.org/1101023002

Cr-Commit-Position: refs/heads/master@{#327173}
parent 55ef921c
...@@ -157,20 +157,20 @@ class PrintBackendWin : public PrintBackend { ...@@ -157,20 +157,20 @@ class PrintBackendWin : public PrintBackend {
PrintBackendWin() {} PrintBackendWin() {}
// PrintBackend implementation. // PrintBackend implementation.
virtual bool EnumeratePrinters(PrinterList* printer_list) override; bool EnumeratePrinters(PrinterList* printer_list) override;
virtual std::string GetDefaultPrinterName() override; std::string GetDefaultPrinterName() override;
virtual bool GetPrinterSemanticCapsAndDefaults( bool GetPrinterSemanticCapsAndDefaults(
const std::string& printer_name, const std::string& printer_name,
PrinterSemanticCapsAndDefaults* printer_info) override; PrinterSemanticCapsAndDefaults* printer_info) override;
virtual bool GetPrinterCapsAndDefaults( bool GetPrinterCapsAndDefaults(
const std::string& printer_name, const std::string& printer_name,
PrinterCapsAndDefaults* printer_info) override; PrinterCapsAndDefaults* printer_info) override;
virtual std::string GetPrinterDriverInfo( std::string GetPrinterDriverInfo(
const std::string& printer_name) override; const std::string& printer_name) override;
virtual bool IsValidPrinter(const std::string& printer_name) override; bool IsValidPrinter(const std::string& printer_name) override;
protected: protected:
virtual ~PrintBackendWin() {} ~PrintBackendWin() override {}
}; };
bool PrintBackendWin::EnumeratePrinters(PrinterList* printer_list) { bool PrintBackendWin::EnumeratePrinters(PrinterList* printer_list) {
......
...@@ -41,7 +41,7 @@ class PRINTING_EXPORT Emf : public Metafile { ...@@ -41,7 +41,7 @@ class PRINTING_EXPORT Emf : public Metafile {
// Generates a virtual HDC that will record every GDI commands and compile // Generates a virtual HDC that will record every GDI commands and compile
// it in a EMF data stream. // it in a EMF data stream.
Emf(); Emf();
virtual ~Emf(); ~Emf() override;
// Closes metafile. // Closes metafile.
void Close(); void Close();
...@@ -54,34 +54,34 @@ class PRINTING_EXPORT Emf : public Metafile { ...@@ -54,34 +54,34 @@ class PRINTING_EXPORT Emf : public Metafile {
bool InitFromFile(const base::FilePath& metafile_path); bool InitFromFile(const base::FilePath& metafile_path);
// Metafile methods. // Metafile methods.
virtual bool Init() override; bool Init() override;
virtual bool InitFromData(const void* src_buffer, bool InitFromData(const void* src_buffer,
uint32 src_buffer_size) override; uint32 src_buffer_size) override;
// Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls
// (since StartPage and EndPage do not work in a metafile DC). Only valid // (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 // when hdc_ is non-NULL. |page_size|, |content_area|, and |scale_factor| are
// ignored. // ignored.
virtual bool StartPage(const gfx::Size& page_size, bool StartPage(const gfx::Size& page_size,
const gfx::Rect& content_area, const gfx::Rect& content_area,
const float& scale_factor) override; const float& scale_factor) override;
virtual bool FinishPage() override; bool FinishPage() override;
virtual bool FinishDocument() override; bool FinishDocument() override;
virtual uint32 GetDataSize() const override; uint32 GetDataSize() const override;
virtual bool GetData(void* buffer, uint32 size) const override; bool GetData(void* buffer, uint32 size) const override;
// Should be passed to Playback to keep the exact same size. // Should be passed to Playback to keep the exact same size.
virtual gfx::Rect GetPageBounds(unsigned int page_number) const override; gfx::Rect GetPageBounds(unsigned int page_number) const override;
virtual unsigned int GetPageCount() const override { return 1; } unsigned int GetPageCount() const override { return 1; }
virtual HDC context() const override { HDC context() const override {
return hdc_; return hdc_;
} }
virtual bool Playback(HDC hdc, const RECT* rect) const override; bool Playback(HDC hdc, const RECT* rect) const override;
virtual bool SafePlayback(HDC hdc) const override; bool SafePlayback(HDC hdc) const override;
HENHMETAFILE emf() const { return emf_; } HENHMETAFILE emf() const { return emf_; }
......
...@@ -41,8 +41,8 @@ class EmfPrintingTest : public testing::Test, public PrintingContext::Delegate { ...@@ -41,8 +41,8 @@ class EmfPrintingTest : public testing::Test, public PrintingContext::Delegate {
} }
// PrintingContext::Delegate methods. // PrintingContext::Delegate methods.
virtual gfx::NativeView GetParentView() override { return NULL; } gfx::NativeView GetParentView() override { return NULL; }
virtual std::string GetAppLocale() override { return std::string(); } std::string GetAppLocale() override { return std::string(); }
}; };
const uint32 EMF_HEADER_SIZE = 128; const uint32 EMF_HEADER_SIZE = 128;
......
...@@ -53,9 +53,9 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile { ...@@ -53,9 +53,9 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
gfx::NativeDrawingContext context() const override; gfx::NativeDrawingContext context() const override;
#if defined(OS_WIN) #if defined(OS_WIN)
virtual bool Playback(gfx::NativeDrawingContext hdc, bool Playback(gfx::NativeDrawingContext hdc,
const RECT* rect) const override; const RECT* rect) const override;
virtual bool SafePlayback(gfx::NativeDrawingContext hdc) const override; bool SafePlayback(gfx::NativeDrawingContext hdc) const override;
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
bool RenderPage(unsigned int page_number, bool RenderPage(unsigned int page_number,
gfx::NativeDrawingContext context, gfx::NativeDrawingContext context,
......
...@@ -19,10 +19,10 @@ class PRINTING_EXPORT PrintingContextSytemDialogWin ...@@ -19,10 +19,10 @@ class PRINTING_EXPORT PrintingContextSytemDialogWin
: public PrintingContextWin { : public PrintingContextWin {
public: public:
explicit PrintingContextSytemDialogWin(Delegate* delegate); explicit PrintingContextSytemDialogWin(Delegate* delegate);
virtual ~PrintingContextSytemDialogWin(); ~PrintingContextSytemDialogWin() override;
// PrintingContext implementation. // PrintingContext implementation.
virtual void AskUserForSettings( void AskUserForSettings(
int max_pages, int max_pages,
bool has_selection, bool has_selection,
bool is_scripted, bool is_scripted,
......
...@@ -18,26 +18,26 @@ class PrintSettings; ...@@ -18,26 +18,26 @@ class PrintSettings;
class PRINTING_EXPORT PrintingContextWin : public PrintingContext { class PRINTING_EXPORT PrintingContextWin : public PrintingContext {
public: public:
explicit PrintingContextWin(Delegate* delegate); explicit PrintingContextWin(Delegate* delegate);
virtual ~PrintingContextWin(); ~PrintingContextWin() override;
// PrintingContext implementation. // PrintingContext implementation.
virtual void AskUserForSettings( void AskUserForSettings(
int max_pages, int max_pages,
bool has_selection, bool has_selection,
bool is_scripted, bool is_scripted,
const PrintSettingsCallback& callback) override; const PrintSettingsCallback& callback) override;
virtual Result UseDefaultSettings() override; Result UseDefaultSettings() override;
virtual gfx::Size GetPdfPaperSizeDeviceUnits() override; gfx::Size GetPdfPaperSizeDeviceUnits() override;
virtual Result UpdatePrinterSettings(bool external_preview, Result UpdatePrinterSettings(bool external_preview,
bool show_system_dialog) override; bool show_system_dialog) override;
virtual Result InitWithSettings(const PrintSettings& settings) override; Result InitWithSettings(const PrintSettings& settings) override;
virtual Result NewDocument(const base::string16& document_name) override; Result NewDocument(const base::string16& document_name) override;
virtual Result NewPage() override; Result NewPage() override;
virtual Result PageDone() override; Result PageDone() override;
virtual Result DocumentDone() override; Result DocumentDone() override;
virtual void Cancel() override; void Cancel() override;
virtual void ReleaseContext() override; void ReleaseContext() override;
virtual gfx::NativeDrawingContext context() const override; gfx::NativeDrawingContext context() const override;
protected: protected:
static HWND GetRootWindow(gfx::NativeView view); static HWND GetRootWindow(gfx::NativeView view);
......
...@@ -24,8 +24,8 @@ class PrintingContextTest : public PrintingTest<testing::Test>, ...@@ -24,8 +24,8 @@ class PrintingContextTest : public PrintingTest<testing::Test>,
} }
// PrintingContext::Delegate methods. // PrintingContext::Delegate methods.
virtual gfx::NativeView GetParentView() override { return NULL; } gfx::NativeView GetParentView() override { return NULL; }
virtual std::string GetAppLocale() override { return std::string(); } std::string GetAppLocale() override { return std::string(); }
protected: protected:
PrintingContext::Result result() const { return result_; } PrintingContext::Result result() const { return result_; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment