diff options
author | dcheng <dcheng@chromium.org> | 2014-12-22 14:51:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-22 22:52:23 +0000 |
commit | 5a497214004c483e3b174f602e86ca998c3fb153 (patch) | |
tree | 4609720ee69a3e2fc54d5b8f8ea642527ebf779d /ash/wm | |
parent | 3ef9ec9e43e5e5b7aca6ea935407a469d7b528cf (diff) | |
download | chromium_src-5a497214004c483e3b174f602e86ca998c3fb153.zip chromium_src-5a497214004c483e3b174f602e86ca998c3fb153.tar.gz chromium_src-5a497214004c483e3b174f602e86ca998c3fb153.tar.bz2 |
Standardize usage of virtual/override/final specifiers in ash/.
The Google C++ style guide states:
Explicitly annotate overrides of virtual functions or virtual
destructors with an override or (less frequently) final specifier.
Older (pre-C++11) code will use the virtual keyword as an inferior
alternative annotation. For clarity, use exactly one of override,
final, or virtual when declaring an override.
To better conform to these guidelines, the following constructs have
been rewritten:
- if a base class has a virtual destructor, then:
virtual ~Foo(); -> ~Foo() override;
- virtual void Foo() override; -> void Foo() override;
- virtual void Foo() override final; -> void Foo() final;
This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.
Several formatting edits by clang-format were manually reverted, due to
mangling of some of the more complicate IPC macros.
BUG=417463
Review URL: https://codereview.chromium.org/817393002
Cr-Commit-Position: refs/heads/master@{#309477}
Diffstat (limited to 'ash/wm')
-rw-r--r-- | ash/wm/always_on_top_controller_unittest.cc | 4 | ||||
-rw-r--r-- | ash/wm/overview/scoped_transform_overview_window.h | 2 | ||||
-rw-r--r-- | ash/wm/overview/transparent_activate_window_button.cc | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/ash/wm/always_on_top_controller_unittest.cc b/ash/wm/always_on_top_controller_unittest.cc index fe502e3..535ed5f 100644 --- a/ash/wm/always_on_top_controller_unittest.cc +++ b/ash/wm/always_on_top_controller_unittest.cc @@ -38,9 +38,9 @@ class TestLayoutManager : public WorkspaceLayoutManager { explicit TestLayoutManager(aura::Window* window) : WorkspaceLayoutManager(window), keyboard_bounds_changed_(false) {} - ~TestLayoutManager() {} + ~TestLayoutManager() override {} - virtual void OnKeyboardBoundsChanging(const gfx::Rect& bounds) override { + void OnKeyboardBoundsChanging(const gfx::Rect& bounds) override { keyboard_bounds_changed_ = true; WorkspaceLayoutManager::OnKeyboardBoundsChanging(bounds); } diff --git a/ash/wm/overview/scoped_transform_overview_window.h b/ash/wm/overview/scoped_transform_overview_window.h index b38f517..daa25dee 100644 --- a/ash/wm/overview/scoped_transform_overview_window.h +++ b/ash/wm/overview/scoped_transform_overview_window.h @@ -51,7 +51,7 @@ class ScopedTransformOverviewWindow const gfx::Rect& dst_rect); explicit ScopedTransformOverviewWindow(aura::Window* window); - virtual ~ScopedTransformOverviewWindow(); + ~ScopedTransformOverviewWindow() override; gfx::Transform get_overview_transform() const { return overview_transform_; } diff --git a/ash/wm/overview/transparent_activate_window_button.cc b/ash/wm/overview/transparent_activate_window_button.cc index 5c6a404..212b57c 100644 --- a/ash/wm/overview/transparent_activate_window_button.cc +++ b/ash/wm/overview/transparent_activate_window_button.cc @@ -35,11 +35,9 @@ class TransparentButton TransparentActivateWindowButtonDelegate* delegate() { return delegate_; } // views::View: - virtual void OnGestureEvent(ui::GestureEvent* event) override; + void OnGestureEvent(ui::GestureEvent* event) override; - virtual const char* GetClassName() const override { - return kTransparentButtonName; - } + const char* GetClassName() const override { return kTransparentButtonName; } // views::ButtonListener: void ButtonPressed(views::Button* sender, const ui::Event& event) override; |