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

Unified Diff: chrome/browser/ui/views/app_list/app_list_dialog_container.cc

Issue 681053002: Standardize usage of virtual/override/final specifiers. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/app_list/linux/app_list_linux_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/app_list/app_list_dialog_container.cc
diff --git a/chrome/browser/ui/views/app_list/app_list_dialog_container.cc b/chrome/browser/ui/views/app_list/app_list_dialog_container.cc
index 1956c0d6ecbdec1a70b2f9c2d631bf2686acaa4d..49eb02a21e3d36d379076beeda7a2c11b830c1e8 100644
--- a/chrome/browser/ui/views/app_list/app_list_dialog_container.cc
+++ b/chrome/browser/ui/views/app_list/app_list_dialog_container.cc
@@ -33,10 +33,10 @@ namespace {
class AppListOverlayBackground : public views::Background {
public:
AppListOverlayBackground() {}
- virtual ~AppListOverlayBackground() {}
+ ~AppListOverlayBackground() override {}
// Overridden from views::Background:
- virtual void Paint(gfx::Canvas* canvas, views::View* view) const override {
+ void Paint(gfx::Canvas* canvas, views::View* view) const override {
// The radius of the app list overlay (the dialog's background).
// TODO(sashab): Using SupportsShadow() from app_list_view.cc, make this
// 1px smaller on platforms that support shadows.
@@ -71,11 +71,11 @@ class AppListDialogContainer : public views::DialogDelegateView,
close_button_->AddAccelerator(escape);
AddChildView(close_button_);
}
- virtual ~AppListDialogContainer() {}
+ ~AppListDialogContainer() override {}
private:
// Overridden from views::View:
- virtual void Layout() override {
+ void Layout() override {
// Margin of the close button from the top right-hand corner of the dialog.
const int kCloseButtonDialogMargin = 10;
@@ -88,27 +88,22 @@ class AppListDialogContainer : public views::DialogDelegateView,
}
// Overridden from views::WidgetDelegate:
- virtual views::View* GetInitiallyFocusedView() override {
- return GetContentsView();
- }
- virtual ui::ModalType GetModalType() const override {
- return ui::MODAL_TYPE_WINDOW;
- }
- virtual void WindowClosing() override {
+ views::View* GetInitiallyFocusedView() override { return GetContentsView(); }
+ ui::ModalType GetModalType() const override { return ui::MODAL_TYPE_WINDOW; }
+ void WindowClosing() override {
if (!close_callback_.is_null())
close_callback_.Run();
}
- virtual views::ClientView* CreateClientView(views::Widget* widget) override {
+ views::ClientView* CreateClientView(views::Widget* widget) override {
return new views::ClientView(widget, GetContentsView());
}
- virtual views::NonClientFrameView* CreateNonClientFrameView(
+ views::NonClientFrameView* CreateNonClientFrameView(
views::Widget* widget) override {
return new views::NativeFrameView(widget);
}
// Overridden from views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) override {
+ void ButtonPressed(views::Button* sender, const ui::Event& event) override {
if (sender == close_button_) {
GetWidget()->Close();
} else {
@@ -129,12 +124,12 @@ class AppListDialogContainer : public views::DialogDelegateView,
class FullSizeBubbleFrameView : public views::BubbleFrameView {
public:
FullSizeBubbleFrameView() : views::BubbleFrameView(gfx::Insets()) {}
- virtual ~FullSizeBubbleFrameView() {}
+ ~FullSizeBubbleFrameView() override {}
private:
// Overridden from views::ViewTargeterDelegate:
- virtual bool DoesIntersectRect(const View* target,
- const gfx::Rect& rect) const override {
+ bool DoesIntersectRect(const View* target,
+ const gfx::Rect& rect) const override {
// Make sure click events can still reach the close button, even if the
// ClientView overlaps it.
if (IsCloseButtonVisible() && GetCloseButtonBounds().Intersects(rect))
@@ -143,7 +138,7 @@ class FullSizeBubbleFrameView : public views::BubbleFrameView {
}
// Overridden from views::View:
- virtual gfx::Insets GetInsets() const override { return gfx::Insets(); }
+ gfx::Insets GetInsets() const override { return gfx::Insets(); }
DISALLOW_COPY_AND_ASSIGN(FullSizeBubbleFrameView);
};
@@ -160,26 +155,22 @@ class NativeDialogContainer : public views::DialogDelegateView {
SetLayoutManager(new views::FillLayout());
AddChildView(dialog_body_);
}
- virtual ~NativeDialogContainer() {}
+ ~NativeDialogContainer() override {}
private:
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize() const override { return size_; }
+ gfx::Size GetPreferredSize() const override { return size_; }
// Overridden from views::WidgetDelegate:
- virtual ui::ModalType GetModalType() const override {
- return ui::MODAL_TYPE_WINDOW;
- }
- virtual void WindowClosing() override {
+ ui::ModalType GetModalType() const override { return ui::MODAL_TYPE_WINDOW; }
+ void WindowClosing() override {
if (!close_callback_.is_null())
close_callback_.Run();
}
// Overridden from views::DialogDelegate:
- virtual int GetDialogButtons() const override {
- return ui::DIALOG_BUTTON_NONE;
- }
- virtual views::NonClientFrameView* CreateNonClientFrameView(
+ int GetDialogButtons() const override { return ui::DIALOG_BUTTON_NONE; }
+ views::NonClientFrameView* CreateNonClientFrameView(
views::Widget* widget) override {
FullSizeBubbleFrameView* frame = new FullSizeBubbleFrameView();
scoped_ptr<views::BubbleBorder> border(
« no previous file with comments | « no previous file | chrome/browser/ui/views/app_list/linux/app_list_linux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698