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

Unified Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 682763002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 83280eaaa177efa2d7726d30a35b59eca04f29c8..5202d18be576bf6693a7755273f98fe84ae3cbe0 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -199,10 +199,10 @@ class Tab::FaviconCrashAnimation : public gfx::LinearAnimation,
: gfx::LinearAnimation(1000, 25, this),
target_(target) {
}
- virtual ~FaviconCrashAnimation() {}
+ ~FaviconCrashAnimation() override {}
// gfx::Animation overrides:
- virtual void AnimateToState(double state) override {
+ void AnimateToState(double state) override {
const double kHidingOffset = 27;
if (state < .5) {
@@ -217,7 +217,7 @@ class Tab::FaviconCrashAnimation : public gfx::LinearAnimation,
}
// gfx::AnimationDelegate overrides:
- virtual void AnimationCanceled(const gfx::Animation* animation) override {
+ void AnimationCanceled(const gfx::Animation* animation) override {
target_->SetFaviconHidingOffset(0);
}
@@ -242,10 +242,10 @@ class Tab::TabCloseButton : public views::ImageButton,
scoped_ptr<views::ViewTargeter>(new views::ViewTargeter(this)));
}
- virtual ~TabCloseButton() {}
+ ~TabCloseButton() override {}
// views::View:
- virtual View* GetTooltipHandlerForPoint(const gfx::Point& point) override {
+ View* GetTooltipHandlerForPoint(const gfx::Point& point) override {
// Tab close button has no children, so tooltip handler should be the same
// as the event handler.
// In addition, a hit test has to be performed for the point (as
@@ -255,7 +255,7 @@ class Tab::TabCloseButton : public views::ImageButton,
return GetEventHandlerForPoint(point);
}
- virtual bool OnMousePressed(const ui::MouseEvent& event) override {
+ bool OnMousePressed(const ui::MouseEvent& event) override {
tab_->controller_->OnMouseEventInTab(this, event);
bool handled = ImageButton::OnMousePressed(event);
@@ -264,26 +264,24 @@ class Tab::TabCloseButton : public views::ImageButton,
return event.IsOnlyMiddleMouseButton() ? false : handled;
}
- virtual void OnMouseMoved(const ui::MouseEvent& event) override {
+ void OnMouseMoved(const ui::MouseEvent& event) override {
tab_->controller_->OnMouseEventInTab(this, event);
CustomButton::OnMouseMoved(event);
}
- virtual void OnMouseReleased(const ui::MouseEvent& event) override {
+ void OnMouseReleased(const ui::MouseEvent& event) override {
tab_->controller_->OnMouseEventInTab(this, event);
CustomButton::OnMouseReleased(event);
}
- virtual void OnGestureEvent(ui::GestureEvent* event) override {
+ void OnGestureEvent(ui::GestureEvent* event) override {
// Consume all gesture events here so that the parent (Tab) does not
// start consuming gestures.
ImageButton::OnGestureEvent(event);
event->SetHandled();
}
- virtual const char* GetClassName() const override {
- return kTabCloseButtonName;
- }
+ const char* GetClassName() const override { return kTabCloseButtonName; }
private:
// Returns the rectangular bounds of parent tab's visible region in the
@@ -316,7 +314,7 @@ class Tab::TabCloseButton : public views::ImageButton,
}
// views::ViewTargeterDelegate:
- virtual View* TargetForRect(View* root, const gfx::Rect& rect) override {
+ View* TargetForRect(View* root, const gfx::Rect& rect) override {
CHECK_EQ(root, this);
if (!views::UsePointBasedTargeting(rect))
@@ -334,7 +332,7 @@ class Tab::TabCloseButton : public views::ImageButton,
}
// views:MaskedTargeterDelegate:
- virtual bool GetHitTestMask(gfx::Path* mask) const override {
+ bool GetHitTestMask(gfx::Path* mask) const override {
DCHECK(mask);
mask->reset();
@@ -355,8 +353,8 @@ class Tab::TabCloseButton : public views::ImageButton,
return false;
}
- virtual bool DoesIntersectRect(const View* target,
- const gfx::Rect& rect) const override {
+ bool DoesIntersectRect(const View* target,
+ const gfx::Rect& rect) const override {
CHECK_EQ(target, this);
// If the request is not made in response to a gesture, use the
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698