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 {
PrintBackendWin() {}
// PrintBackend implementation.
virtual bool EnumeratePrinters(PrinterList* printer_list) override;
virtual std::string GetDefaultPrinterName() override;
virtual bool GetPrinterSemanticCapsAndDefaults(
bool EnumeratePrinters(PrinterList* printer_list) override;
std::string GetDefaultPrinterName() override;
bool GetPrinterSemanticCapsAndDefaults(
const std::string& printer_name,
PrinterSemanticCapsAndDefaults* printer_info) override;
virtual bool GetPrinterCapsAndDefaults(
bool GetPrinterCapsAndDefaults(
const std::string& printer_name,
PrinterCapsAndDefaults* printer_info) override;
virtual std::string GetPrinterDriverInfo(
std::string GetPrinterDriverInfo(
const std::string& printer_name) override;
virtual bool IsValidPrinter(const std::string& printer_name) override;
bool IsValidPrinter(const std::string& printer_name) override;
protected:
virtual ~PrintBackendWin() {}
~PrintBackendWin() override {}
};
bool PrintBackendWin::EnumeratePrinters(PrinterList* printer_list) {
......
......@@ -41,7 +41,7 @@ class PRINTING_EXPORT Emf : public Metafile {
// Generates a virtual HDC that will record every GDI commands and compile
// it in a EMF data stream.
Emf();
virtual ~Emf();
~Emf() override;
// Closes metafile.
void Close();
......@@ -54,34 +54,34 @@ class PRINTING_EXPORT Emf : public Metafile {
bool InitFromFile(const base::FilePath& metafile_path);
// Metafile methods.
virtual bool Init() override;
virtual bool InitFromData(const void* src_buffer,
uint32 src_buffer_size) override;
bool Init() override;
bool InitFromData(const void* src_buffer,
uint32 src_buffer_size) 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) override;
virtual bool FinishPage() override;
virtual bool FinishDocument() override;
bool StartPage(const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor) override;
bool FinishPage() override;
bool FinishDocument() override;
virtual uint32 GetDataSize() const override;
virtual bool GetData(void* buffer, uint32 size) const override;
uint32 GetDataSize() const override;
bool GetData(void* buffer, uint32 size) const override;
// 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_;
}
virtual bool Playback(HDC hdc, const RECT* rect) const override;
virtual bool SafePlayback(HDC hdc) const override;
bool Playback(HDC hdc, const RECT* rect) const override;
bool SafePlayback(HDC hdc) const override;
HENHMETAFILE emf() const { return emf_; }
......
......@@ -41,8 +41,8 @@ class EmfPrintingTest : public testing::Test, public PrintingContext::Delegate {
}
// PrintingContext::Delegate methods.
virtual gfx::NativeView GetParentView() override { return NULL; }
virtual std::string GetAppLocale() override { return std::string(); }
gfx::NativeView GetParentView() override { return NULL; }
std::string GetAppLocale() override { return std::string(); }
};
const uint32 EMF_HEADER_SIZE = 128;
......
......@@ -53,9 +53,9 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
gfx::NativeDrawingContext context() const override;
#if defined(OS_WIN)
virtual bool Playback(gfx::NativeDrawingContext hdc,
const RECT* rect) const override;
virtual bool SafePlayback(gfx::NativeDrawingContext hdc) const override;
bool Playback(gfx::NativeDrawingContext hdc,
const RECT* rect) const override;
bool SafePlayback(gfx::NativeDrawingContext hdc) const override;
#elif defined(OS_MACOSX)
bool RenderPage(unsigned int page_number,
gfx::NativeDrawingContext context,
......
......@@ -19,10 +19,10 @@ class PRINTING_EXPORT PrintingContextSytemDialogWin
: public PrintingContextWin {
public:
explicit PrintingContextSytemDialogWin(Delegate* delegate);
virtual ~PrintingContextSytemDialogWin();
~PrintingContextSytemDialogWin() override;
// PrintingContext implementation.
virtual void AskUserForSettings(
void AskUserForSettings(
int max_pages,
bool has_selection,
bool is_scripted,
......
......@@ -18,26 +18,26 @@ class PrintSettings;
class PRINTING_EXPORT PrintingContextWin : public PrintingContext {
public:
explicit PrintingContextWin(Delegate* delegate);
virtual ~PrintingContextWin();
~PrintingContextWin() override;
// PrintingContext implementation.
virtual void AskUserForSettings(
void AskUserForSettings(
int max_pages,
bool has_selection,
bool is_scripted,
const PrintSettingsCallback& callback) override;
virtual Result UseDefaultSettings() override;
virtual gfx::Size GetPdfPaperSizeDeviceUnits() override;
virtual Result UpdatePrinterSettings(bool external_preview,
bool show_system_dialog) override;
virtual Result InitWithSettings(const PrintSettings& settings) override;
virtual Result NewDocument(const base::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;
Result UseDefaultSettings() override;
gfx::Size GetPdfPaperSizeDeviceUnits() override;
Result UpdatePrinterSettings(bool external_preview,
bool show_system_dialog) override;
Result InitWithSettings(const PrintSettings& settings) override;
Result NewDocument(const base::string16& document_name) override;
Result NewPage() override;
Result PageDone() override;
Result DocumentDone() override;
void Cancel() override;
void ReleaseContext() override;
gfx::NativeDrawingContext context() const override;
protected:
static HWND GetRootWindow(gfx::NativeView view);
......
......@@ -24,8 +24,8 @@ class PrintingContextTest : public PrintingTest<testing::Test>,
}
// PrintingContext::Delegate methods.
virtual gfx::NativeView GetParentView() override { return NULL; }
virtual std::string GetAppLocale() override { return std::string(); }
gfx::NativeView GetParentView() override { return NULL; }
std::string GetAppLocale() override { return std::string(); }
protected:
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