summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/wm/core/accelerator_filter.h4
-rw-r--r--ui/wm/core/base_focus_rules.h18
-rw-r--r--ui/wm/core/capture_controller.h14
-rw-r--r--ui/wm/core/compound_event_filter.h12
-rw-r--r--ui/wm/core/compound_event_filter_unittest.cc6
-rw-r--r--ui/wm/core/cursor_manager_unittest.cc24
-rw-r--r--ui/wm/core/default_activation_client.cc4
-rw-r--r--ui/wm/core/default_activation_client.h21
-rw-r--r--ui/wm/core/easy_resize_window_targeter.h7
-rw-r--r--ui/wm/core/focus_controller.h52
-rw-r--r--ui/wm/core/focus_controller_unittest.cc168
-rw-r--r--ui/wm/core/image_grid.h11
-rw-r--r--ui/wm/core/input_method_event_filter.h6
-rw-r--r--ui/wm/core/input_method_event_filter_unittest.cc8
-rw-r--r--ui/wm/core/masked_window_targeter.h7
-rw-r--r--ui/wm/core/nested_accelerator_controller.h9
-rw-r--r--ui/wm/core/nested_accelerator_controller_unittest.cc21
-rw-r--r--ui/wm/core/nested_accelerator_dispatcher_linux.cc8
-rw-r--r--ui/wm/core/shadow.h4
-rw-r--r--ui/wm/core/shadow_controller.cc18
-rw-r--r--ui/wm/core/shadow_controller.h6
-rw-r--r--ui/wm/core/shadow_controller_unittest.cc6
-rw-r--r--ui/wm/core/shadow_unittest.cc41
-rw-r--r--ui/wm/core/transient_window_controller.h13
-rw-r--r--ui/wm/core/transient_window_manager.h16
-rw-r--r--ui/wm/core/transient_window_manager_unittest.cc40
-rw-r--r--ui/wm/core/transient_window_stacking_client.h8
-rw-r--r--ui/wm/core/transient_window_stacking_client_unittest.cc6
-rw-r--r--ui/wm/core/user_activity_detector.h12
-rw-r--r--ui/wm/core/user_activity_detector_unittest.cc10
-rw-r--r--ui/wm/core/visibility_controller.h5
-rw-r--r--ui/wm/core/window_animations.cc20
-rw-r--r--ui/wm/core/window_animations_unittest.cc15
-rw-r--r--ui/wm/core/window_modality_controller.h21
-rw-r--r--ui/wm/public/scoped_tooltip_disabler.h4
-rw-r--r--ui/wm/test/run_all_unittests.cc4
-rw-r--r--ui/wm/test/wm_test_helper.h8
37 files changed, 301 insertions, 356 deletions
diff --git a/ui/wm/core/accelerator_filter.h b/ui/wm/core/accelerator_filter.h
index 0ac7605..44579ef 100644
--- a/ui/wm/core/accelerator_filter.h
+++ b/ui/wm/core/accelerator_filter.h
@@ -22,10 +22,10 @@ class AcceleratorDelegate;
class WM_EXPORT AcceleratorFilter : public ui::EventHandler {
public:
AcceleratorFilter(scoped_ptr<AcceleratorDelegate> delegate);
- virtual ~AcceleratorFilter();
+ ~AcceleratorFilter() override;
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ void OnKeyEvent(ui::KeyEvent* event) override;
private:
scoped_ptr<AcceleratorDelegate> delegate_;
diff --git a/ui/wm/core/base_focus_rules.h b/ui/wm/core/base_focus_rules.h
index 8073541..4ce5e3a 100644
--- a/ui/wm/core/base_focus_rules.h
+++ b/ui/wm/core/base_focus_rules.h
@@ -16,7 +16,7 @@ namespace wm {
class WM_EXPORT BaseFocusRules : public FocusRules {
protected:
BaseFocusRules();
- virtual ~BaseFocusRules();
+ ~BaseFocusRules() override;
// Returns true if the children of |window| can be activated.
virtual bool SupportsChildActivation(aura::Window* window) const = 0;
@@ -26,15 +26,13 @@ class WM_EXPORT BaseFocusRules : public FocusRules {
aura::Window* window) const;
// Overridden from FocusRules:
- virtual bool IsToplevelWindow(aura::Window* window) const override;
- virtual bool CanActivateWindow(aura::Window* window) const override;
- virtual bool CanFocusWindow(aura::Window* window) const override;
- virtual aura::Window* GetToplevelWindow(aura::Window* window) const override;
- virtual aura::Window* GetActivatableWindow(
- aura::Window* window) const override;
- virtual aura::Window* GetFocusableWindow(aura::Window* window) const override;
- virtual aura::Window* GetNextActivatableWindow(
- aura::Window* ignore) const override;
+ bool IsToplevelWindow(aura::Window* window) const override;
+ bool CanActivateWindow(aura::Window* window) const override;
+ bool CanFocusWindow(aura::Window* window) const override;
+ aura::Window* GetToplevelWindow(aura::Window* window) const override;
+ aura::Window* GetActivatableWindow(aura::Window* window) const override;
+ aura::Window* GetFocusableWindow(aura::Window* window) const override;
+ aura::Window* GetNextActivatableWindow(aura::Window* ignore) const override;
private:
DISALLOW_COPY_AND_ASSIGN(BaseFocusRules);
diff --git a/ui/wm/core/capture_controller.h b/ui/wm/core/capture_controller.h
index 230ea50..bd9beb9 100644
--- a/ui/wm/core/capture_controller.h
+++ b/ui/wm/core/capture_controller.h
@@ -29,17 +29,17 @@ class WM_EXPORT CaptureController : public aura::client::CaptureClient {
bool is_active() const { return !root_windows_.empty(); }
// Overridden from aura::client::CaptureClient:
- virtual void SetCapture(aura::Window* window) override;
- virtual void ReleaseCapture(aura::Window* window) override;
- virtual aura::Window* GetCaptureWindow() override;
- virtual aura::Window* GetGlobalCaptureWindow() override;
+ void SetCapture(aura::Window* window) override;
+ void ReleaseCapture(aura::Window* window) override;
+ aura::Window* GetCaptureWindow() override;
+ aura::Window* GetGlobalCaptureWindow() override;
private:
friend class ScopedCaptureClient;
typedef std::set<aura::Window*> RootWindows;
CaptureController();
- virtual ~CaptureController();
+ ~CaptureController() override;
// The current capture window. NULL if there is no capture window.
aura::Window* capture_window_;
@@ -56,7 +56,7 @@ class WM_EXPORT CaptureController : public aura::client::CaptureClient {
class WM_EXPORT ScopedCaptureClient : public aura::WindowObserver {
public:
explicit ScopedCaptureClient(aura::Window* root);
- virtual ~ScopedCaptureClient();
+ ~ScopedCaptureClient() override;
// Returns true if there is a CaptureController with at least one RootWindow.
static bool IsActive();
@@ -66,7 +66,7 @@ class WM_EXPORT ScopedCaptureClient : public aura::WindowObserver {
}
// Overridden from aura::WindowObserver:
- virtual void OnWindowDestroyed(aura::Window* window) override;
+ void OnWindowDestroyed(aura::Window* window) override;
private:
// Invoked from destructor and OnWindowDestroyed() to cleanup.
diff --git a/ui/wm/core/compound_event_filter.h b/ui/wm/core/compound_event_filter.h
index a7767f3..946f3c8 100644
--- a/ui/wm/core/compound_event_filter.h
+++ b/ui/wm/core/compound_event_filter.h
@@ -40,7 +40,7 @@ namespace wm {
class WM_EXPORT CompoundEventFilter : public ui::EventHandler {
public:
CompoundEventFilter();
- virtual ~CompoundEventFilter();
+ ~CompoundEventFilter() override;
// Returns the cursor for the specified component.
static gfx::NativeCursor CursorForWindowComponent(int window_component);
@@ -73,11 +73,11 @@ class WM_EXPORT CompoundEventFilter : public ui::EventHandler {
bool enable);
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) override;
- virtual void OnMouseEvent(ui::MouseEvent* event) override;
- virtual void OnScrollEvent(ui::ScrollEvent* event) override;
- virtual void OnTouchEvent(ui::TouchEvent* event) override;
- virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ void OnKeyEvent(ui::KeyEvent* event) override;
+ void OnMouseEvent(ui::MouseEvent* event) override;
+ void OnScrollEvent(ui::ScrollEvent* event) override;
+ void OnTouchEvent(ui::TouchEvent* event) override;
+ void OnGestureEvent(ui::GestureEvent* event) override;
// Additional pre-target event handlers.
ObserverList<ui::EventHandler, true> handlers_;
diff --git a/ui/wm/core/compound_event_filter_unittest.cc b/ui/wm/core/compound_event_filter_unittest.cc
index 05f75e9..453e03f 100644
--- a/ui/wm/core/compound_event_filter_unittest.cc
+++ b/ui/wm/core/compound_event_filter_unittest.cc
@@ -35,13 +35,11 @@ namespace {
class ConsumeGestureEventFilter : public ui::EventHandler {
public:
ConsumeGestureEventFilter() {}
- virtual ~ConsumeGestureEventFilter() {}
+ ~ConsumeGestureEventFilter() override {}
private:
// Overridden from ui::EventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* e) override {
- e->StopPropagation();
- }
+ void OnGestureEvent(ui::GestureEvent* e) override { e->StopPropagation(); }
DISALLOW_COPY_AND_ASSIGN(ConsumeGestureEventFilter);
};
diff --git a/ui/wm/core/cursor_manager_unittest.cc b/ui/wm/core/cursor_manager_unittest.cc
index 8dd2aa8..24de948 100644
--- a/ui/wm/core/cursor_manager_unittest.cc
+++ b/ui/wm/core/cursor_manager_unittest.cc
@@ -13,31 +13,27 @@ namespace {
class TestingCursorManager : public wm::NativeCursorManager {
public:
// Overridden from wm::NativeCursorManager:
- virtual void SetDisplay(
- const gfx::Display& display,
- wm::NativeCursorManagerDelegate* delegate) override {}
+ void SetDisplay(const gfx::Display& display,
+ wm::NativeCursorManagerDelegate* delegate) override {}
- virtual void SetCursor(
- gfx::NativeCursor cursor,
- wm::NativeCursorManagerDelegate* delegate) override {
+ void SetCursor(gfx::NativeCursor cursor,
+ wm::NativeCursorManagerDelegate* delegate) override {
delegate->CommitCursor(cursor);
}
- virtual void SetVisibility(
- bool visible,
- wm::NativeCursorManagerDelegate* delegate) override {
+ void SetVisibility(bool visible,
+ wm::NativeCursorManagerDelegate* delegate) override {
delegate->CommitVisibility(visible);
}
- virtual void SetMouseEventsEnabled(
+ void SetMouseEventsEnabled(
bool enabled,
wm::NativeCursorManagerDelegate* delegate) override {
delegate->CommitMouseEventsEnabled(enabled);
}
- virtual void SetCursorSet(
- ui::CursorSetType cursor_set,
- wm::NativeCursorManagerDelegate* delegate) override {
+ void SetCursorSet(ui::CursorSetType cursor_set,
+ wm::NativeCursorManagerDelegate* delegate) override {
delegate->CommitCursorSet(cursor_set);
}
};
@@ -66,7 +62,7 @@ class TestingCursorClientObserver : public aura::client::CursorClientObserver {
bool did_visibility_change() const { return did_visibility_change_; }
// Overridden from aura::client::CursorClientObserver:
- virtual void OnCursorVisibilityChanged(bool is_visible) override {
+ void OnCursorVisibilityChanged(bool is_visible) override {
cursor_visibility_ = is_visible;
did_visibility_change_ = true;
}
diff --git a/ui/wm/core/default_activation_client.cc b/ui/wm/core/default_activation_client.cc
index d6383d6..20c0d79 100644
--- a/ui/wm/core/default_activation_client.cc
+++ b/ui/wm/core/default_activation_client.cc
@@ -20,10 +20,10 @@ class DefaultActivationClient::Deleter : public aura::WindowObserver {
}
private:
- virtual ~Deleter() {}
+ ~Deleter() override {}
// Overridden from WindowObserver:
- virtual void OnWindowDestroyed(aura::Window* window) override {
+ void OnWindowDestroyed(aura::Window* window) override {
DCHECK_EQ(window, root_window_);
root_window_->RemoveObserver(this);
delete client_;
diff --git a/ui/wm/core/default_activation_client.h b/ui/wm/core/default_activation_client.h
index fb9f9e2..726d886 100644
--- a/ui/wm/core/default_activation_client.h
+++ b/ui/wm/core/default_activation_client.h
@@ -32,24 +32,23 @@ class WM_EXPORT DefaultActivationClient : public aura::client::ActivationClient,
explicit DefaultActivationClient(aura::Window* root_window);
// Overridden from aura::client::ActivationClient:
- virtual void AddObserver(
+ void AddObserver(aura::client::ActivationChangeObserver* observer) override;
+ void RemoveObserver(
aura::client::ActivationChangeObserver* observer) override;
- virtual void RemoveObserver(
- aura::client::ActivationChangeObserver* observer) override;
- virtual void ActivateWindow(aura::Window* window) override;
- virtual void DeactivateWindow(aura::Window* window) override;
- virtual aura::Window* GetActiveWindow() override;
- virtual aura::Window* GetActivatableWindow(aura::Window* window) override;
- virtual aura::Window* GetToplevelWindow(aura::Window* window) override;
- virtual bool CanActivateWindow(aura::Window* window) const override;
+ void ActivateWindow(aura::Window* window) override;
+ void DeactivateWindow(aura::Window* window) override;
+ aura::Window* GetActiveWindow() override;
+ aura::Window* GetActivatableWindow(aura::Window* window) override;
+ aura::Window* GetToplevelWindow(aura::Window* window) override;
+ bool CanActivateWindow(aura::Window* window) const override;
// Overridden from WindowObserver:
- virtual void OnWindowDestroyed(aura::Window* window) override;
+ void OnWindowDestroyed(aura::Window* window) override;
private:
class Deleter;
- virtual ~DefaultActivationClient();
+ ~DefaultActivationClient() override;
void RemoveActiveWindow(aura::Window* window);
// This class explicitly does NOT store the active window in a window property
diff --git a/ui/wm/core/easy_resize_window_targeter.h b/ui/wm/core/easy_resize_window_targeter.h
index 5693300..2543a23 100644
--- a/ui/wm/core/easy_resize_window_targeter.h
+++ b/ui/wm/core/easy_resize_window_targeter.h
@@ -20,7 +20,7 @@ class WM_EXPORT EasyResizeWindowTargeter : public aura::WindowTargeter {
const gfx::Insets& mouse_extend,
const gfx::Insets& touch_extend);
- virtual ~EasyResizeWindowTargeter();
+ ~EasyResizeWindowTargeter() override;
protected:
void set_mouse_extend(const gfx::Insets& mouse_extend) {
@@ -32,9 +32,8 @@ class WM_EXPORT EasyResizeWindowTargeter : public aura::WindowTargeter {
}
// ui::EventTargeter:
- virtual bool EventLocationInsideBounds(
- ui::EventTarget* target,
- const ui::LocatedEvent& event) const override;
+ bool EventLocationInsideBounds(ui::EventTarget* target,
+ const ui::LocatedEvent& event) const override;
private:
// Returns true if the hit testing (EventLocationInsideBounds()) should use
diff --git a/ui/wm/core/focus_controller.h b/ui/wm/core/focus_controller.h
index 9e4149f..43d3c608b 100644
--- a/ui/wm/core/focus_controller.h
+++ b/ui/wm/core/focus_controller.h
@@ -41,45 +41,39 @@ class WM_EXPORT FocusController : public aura::client::ActivationClient,
public:
// |rules| cannot be NULL.
explicit FocusController(FocusRules* rules);
- virtual ~FocusController();
+ ~FocusController() override;
private:
// Overridden from aura::client::ActivationClient:
- virtual void AddObserver(
+ void AddObserver(aura::client::ActivationChangeObserver* observer) override;
+ void RemoveObserver(
aura::client::ActivationChangeObserver* observer) override;
- virtual void RemoveObserver(
- aura::client::ActivationChangeObserver* observer) override;
- virtual void ActivateWindow(aura::Window* window) override;
- virtual void DeactivateWindow(aura::Window* window) override;
- virtual aura::Window* GetActiveWindow() override;
- virtual aura::Window* GetActivatableWindow(aura::Window* window) override;
- virtual aura::Window* GetToplevelWindow(aura::Window* window) override;
- virtual bool CanActivateWindow(aura::Window* window) const override;
+ void ActivateWindow(aura::Window* window) override;
+ void DeactivateWindow(aura::Window* window) override;
+ aura::Window* GetActiveWindow() override;
+ aura::Window* GetActivatableWindow(aura::Window* window) override;
+ aura::Window* GetToplevelWindow(aura::Window* window) override;
+ bool CanActivateWindow(aura::Window* window) const override;
// Overridden from aura::client::FocusClient:
- virtual void AddObserver(
- aura::client::FocusChangeObserver* observer) override;
- virtual void RemoveObserver(
- aura::client::FocusChangeObserver* observer) override;
- virtual void FocusWindow(aura::Window* window) override;
- virtual void ResetFocusWithinActiveWindow(aura::Window* window) override;
- virtual aura::Window* GetFocusedWindow() override;
+ void AddObserver(aura::client::FocusChangeObserver* observer) override;
+ void RemoveObserver(aura::client::FocusChangeObserver* observer) override;
+ void FocusWindow(aura::Window* window) override;
+ void ResetFocusWithinActiveWindow(aura::Window* window) override;
+ aura::Window* GetFocusedWindow() override;
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) override;
- virtual void OnMouseEvent(ui::MouseEvent* event) override;
- virtual void OnScrollEvent(ui::ScrollEvent* event) override;
- virtual void OnTouchEvent(ui::TouchEvent* event) override;
- virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ void OnKeyEvent(ui::KeyEvent* event) override;
+ void OnMouseEvent(ui::MouseEvent* event) override;
+ void OnScrollEvent(ui::ScrollEvent* event) override;
+ void OnTouchEvent(ui::TouchEvent* event) override;
+ void OnGestureEvent(ui::GestureEvent* event) override;
// Overridden from aura::WindowObserver:
- virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) override;
- virtual void OnWindowDestroying(aura::Window* window) override;
- virtual void OnWindowHierarchyChanging(
- const HierarchyChangeParams& params) override;
- virtual void OnWindowHierarchyChanged(
- const HierarchyChangeParams& params) override;
+ void OnWindowVisibilityChanged(aura::Window* window, bool visible) override;
+ void OnWindowDestroying(aura::Window* window) override;
+ void OnWindowHierarchyChanging(const HierarchyChangeParams& params) override;
+ void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override;
// Internal implementation that sets the focused window, fires events etc.
// This function must be called with a valid focusable window.
diff --git a/ui/wm/core/focus_controller_unittest.cc b/ui/wm/core/focus_controller_unittest.cc
index 2508bcd..6bd6091 100644
--- a/ui/wm/core/focus_controller_unittest.cc
+++ b/ui/wm/core/focus_controller_unittest.cc
@@ -37,7 +37,7 @@ class FocusNotificationObserver : public aura::client::ActivationChangeObserver,
reactivation_count_(0),
reactivation_requested_window_(NULL),
reactivation_actual_window_(NULL) {}
- virtual ~FocusNotificationObserver() {}
+ ~FocusNotificationObserver() override {}
void ExpectCounts(int activation_changed_count, int focus_changed_count) {
EXPECT_EQ(activation_changed_count, activation_changed_count_);
@@ -55,21 +55,20 @@ class FocusNotificationObserver : public aura::client::ActivationChangeObserver,
private:
// Overridden from aura::client::ActivationChangeObserver:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) override {
+ void OnWindowActivated(aura::Window* gained_active,
+ aura::Window* lost_active) override {
++activation_changed_count_;
}
- virtual void OnAttemptToReactivateWindow(
- aura::Window* request_active,
- aura::Window* actual_active) override {
+ void OnAttemptToReactivateWindow(aura::Window* request_active,
+ aura::Window* actual_active) override {
++reactivation_count_;
reactivation_requested_window_ = request_active;
reactivation_actual_window_ = actual_active;
}
// Overridden from aura::client::FocusChangeObserver:
- virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) override {
+ void OnWindowFocused(aura::Window* gained_focus,
+ aura::Window* lost_focus) override {
++focus_changed_count_;
}
@@ -105,7 +104,7 @@ class RecordingActivationAndFocusChangeObserver
aura::client::GetActivationClient(root_)->AddObserver(this);
aura::client::GetFocusClient(root_)->AddObserver(this);
}
- virtual ~RecordingActivationAndFocusChangeObserver() {
+ ~RecordingActivationAndFocusChangeObserver() override {
aura::client::GetActivationClient(root_)->RemoveObserver(this);
aura::client::GetFocusClient(root_)->RemoveObserver(this);
}
@@ -115,15 +114,15 @@ class RecordingActivationAndFocusChangeObserver
}
// Overridden from aura::client::ActivationChangeObserver:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) override {
+ void OnWindowActivated(aura::Window* gained_active,
+ aura::Window* lost_active) override {
if (lost_active && lost_active == deleter_->GetDeletedWindow())
was_notified_with_deleted_window_ = true;
}
// Overridden from aura::client::FocusChangeObserver:
- virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) override {
+ void OnWindowFocused(aura::Window* gained_focus,
+ aura::Window* lost_focus) override {
if (lost_focus && lost_focus == deleter_->GetDeletedWindow())
was_notified_with_deleted_window_ = true;
}
@@ -153,13 +152,13 @@ class DeleteOnLoseActivationChangeObserver :
did_delete_(false) {
aura::client::GetActivationClient(root_)->AddObserver(this);
}
- virtual ~DeleteOnLoseActivationChangeObserver() {
+ ~DeleteOnLoseActivationChangeObserver() override {
aura::client::GetActivationClient(root_)->RemoveObserver(this);
}
// Overridden from aura::client::ActivationChangeObserver:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) override {
+ void OnWindowActivated(aura::Window* gained_active,
+ aura::Window* lost_active) override {
if (window_ && lost_active == window_) {
delete lost_active;
did_delete_ = true;
@@ -167,7 +166,7 @@ class DeleteOnLoseActivationChangeObserver :
}
// Overridden from WindowDeleter:
- virtual aura::Window* GetDeletedWindow() override {
+ aura::Window* GetDeletedWindow() override {
return did_delete_ ? window_ : NULL;
}
@@ -190,13 +189,13 @@ class DeleteOnLoseFocusChangeObserver
did_delete_(false) {
aura::client::GetFocusClient(root_)->AddObserver(this);
}
- virtual ~DeleteOnLoseFocusChangeObserver() {
+ ~DeleteOnLoseFocusChangeObserver() override {
aura::client::GetFocusClient(root_)->RemoveObserver(this);
}
// Overridden from aura::client::FocusChangeObserver:
- virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) override {
+ void OnWindowFocused(aura::Window* gained_focus,
+ aura::Window* lost_focus) override {
if (window_ && lost_focus == window_) {
delete lost_focus;
did_delete_ = true;
@@ -204,7 +203,7 @@ class DeleteOnLoseFocusChangeObserver
}
// Overridden from WindowDeleter:
- virtual aura::Window* GetDeletedWindow() override {
+ aura::Window* GetDeletedWindow() override {
return did_delete_ ? window_ : NULL;
}
@@ -223,7 +222,7 @@ class ScopedFocusNotificationObserver : public FocusNotificationObserver {
aura::client::GetActivationClient(root_window_)->AddObserver(this);
aura::client::GetFocusClient(root_window_)->AddObserver(this);
}
- virtual ~ScopedFocusNotificationObserver() {
+ ~ScopedFocusNotificationObserver() override {
aura::client::GetActivationClient(root_window_)->RemoveObserver(this);
aura::client::GetFocusClient(root_window_)->RemoveObserver(this);
}
@@ -242,7 +241,7 @@ class ScopedTargetFocusNotificationObserver : public FocusNotificationObserver {
aura::client::SetFocusChangeObserver(target_, this);
tracker_.Add(target_);
}
- virtual ~ScopedTargetFocusNotificationObserver() {
+ ~ScopedTargetFocusNotificationObserver() override {
if (tracker_.Contains(target_)) {
aura::client::SetActivationChangeObserver(target_, NULL);
aura::client::SetFocusChangeObserver(target_, NULL);
@@ -266,8 +265,8 @@ class ScopedFocusedTextInputClientChanger
private:
// Overridden from aura::client::FocusChangeObserver:
- virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) override {
+ void OnWindowFocused(aura::Window* gained_focus,
+ aura::Window* lost_focus) override {
ui::TextInputFocusManager::GetInstance()->FocusTextInputClient(
text_input_client_);
}
@@ -279,15 +278,11 @@ class ScopedFocusedTextInputClientChanger
class SimpleEventHandler : public ui::EventHandler {
public:
SimpleEventHandler() {}
- virtual ~SimpleEventHandler() {}
+ ~SimpleEventHandler() override {}
// Overridden from ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) override {
- event->SetHandled();
- }
- virtual void OnGestureEvent(ui::GestureEvent* event) override {
- event->SetHandled();
- }
+ void OnMouseEvent(ui::MouseEvent* event) override { event->SetHandled(); }
+ void OnGestureEvent(ui::GestureEvent* event) override { event->SetHandled(); }
private:
DISALLOW_COPY_AND_ASSIGN(SimpleEventHandler);
@@ -299,7 +294,7 @@ class FocusShiftingActivationObserver
explicit FocusShiftingActivationObserver(aura::Window* activated_window)
: activated_window_(activated_window),
shift_focus_to_(NULL) {}
- virtual ~FocusShiftingActivationObserver() {}
+ ~FocusShiftingActivationObserver() override {}
void set_shift_focus_to(aura::Window* shift_focus_to) {
shift_focus_to_ = shift_focus_to;
@@ -307,8 +302,8 @@ class FocusShiftingActivationObserver
private:
// Overridden from aura::client::ActivationChangeObserver:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) override {
+ void OnWindowActivated(aura::Window* gained_active,
+ aura::Window* lost_active) override {
// Shift focus to a child. This should prevent the default focusing from
// occurring in FocusController::FocusWindow().
if (gained_active == activated_window_) {
@@ -338,33 +333,30 @@ class TestFocusRules : public BaseFocusRules {
}
// Overridden from BaseFocusRules:
- virtual bool SupportsChildActivation(aura::Window* window) const override {
+ bool SupportsChildActivation(aura::Window* window) const override {
// In FocusControllerTests, only the RootWindow has activatable children.
return window->GetRootWindow() == window;
}
- virtual bool CanActivateWindow(aura::Window* window) const override {
+ bool CanActivateWindow(aura::Window* window) const override {
// Restricting focus to a non-activatable child window means the activatable
// parent outside the focus restriction is activatable.
bool can_activate =
CanFocusOrActivate(window) || window->Contains(focus_restriction_);
return can_activate ? BaseFocusRules::CanActivateWindow(window) : false;
}
- virtual bool CanFocusWindow(aura::Window* window) const override {
+ bool CanFocusWindow(aura::Window* window) const override {
return CanFocusOrActivate(window) ?
BaseFocusRules::CanFocusWindow(window) : false;
}
- virtual aura::Window* GetActivatableWindow(
- aura::Window* window) const override {
+ aura::Window* GetActivatableWindow(aura::Window* window) const override {
return BaseFocusRules::GetActivatableWindow(
CanFocusOrActivate(window) ? window : focus_restriction_);
}
- virtual aura::Window* GetFocusableWindow(
- aura::Window* window) const override {
+ aura::Window* GetFocusableWindow(aura::Window* window) const override {
return BaseFocusRules::GetFocusableWindow(
CanFocusOrActivate(window) ? window : focus_restriction_);
}
- virtual aura::Window* GetNextActivatableWindow(
- aura::Window* ignore) const override {
+ aura::Window* GetNextActivatableWindow(aura::Window* ignore) const override {
aura::Window* next_activatable =
BaseFocusRules::GetNextActivatableWindow(ignore);
return CanFocusOrActivate(next_activatable) ?
@@ -387,7 +379,7 @@ class FocusControllerTestBase : public aura::test::AuraTestBase {
FocusControllerTestBase() {}
// Overridden from aura::test::AuraTestBase:
- virtual void SetUp() override {
+ void SetUp() override {
wm_state_.reset(new wm::WMState);
// FocusController registers itself as an Env observer so it can catch all
// window initializations, including the root_window()'s, so we create it
@@ -430,7 +422,7 @@ class FocusControllerTestBase : public aura::test::AuraTestBase {
aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(), 3,
gfx::Rect(125, 125, 50, 50), root_window());
}
- virtual void TearDown() override {
+ void TearDown() override {
root_window()->RemovePreTargetHandler(focus_controller_.get());
aura::test::AuraTestBase::TearDown();
test_focus_rules_ = NULL; // Owned by FocusController.
@@ -518,14 +510,14 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
}
// Overridden from FocusControllerTestBase:
- virtual void BasicFocus() override {
+ void BasicFocus() override {
EXPECT_EQ(NULL, GetFocusedWindow());
FocusWindowById(1);
EXPECT_EQ(1, GetFocusedWindowId());
FocusWindowById(2);
EXPECT_EQ(2, GetFocusedWindowId());
}
- virtual void BasicActivation() override {
+ void BasicActivation() override {
EXPECT_EQ(NULL, GetActiveWindow());
ActivateWindowById(1);
EXPECT_EQ(1, GetActiveWindowId());
@@ -538,7 +530,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
DeactivateWindow(GetActiveWindow());
EXPECT_EQ(1, GetActiveWindowId());
}
- virtual void FocusEvents() override {
+ void FocusEvents() override {
ScopedFocusNotificationObserver root_observer(root_window());
ScopedTargetFocusNotificationObserver observer1(root_window(), 1);
ScopedTargetFocusNotificationObserver observer2(root_window(), 2);
@@ -557,7 +549,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
observer1.ExpectCounts(2, 2);
observer2.ExpectCounts(1, 1);
}
- virtual void DuplicateFocusEvents() override {
+ void DuplicateFocusEvents() override {
// Focusing an existing focused window should not resend focus events.
ScopedFocusNotificationObserver root_observer(root_window());
ScopedTargetFocusNotificationObserver observer1(root_window(), 1);
@@ -573,7 +565,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
root_observer.ExpectCounts(1, 1);
observer1.ExpectCounts(1, 1);
}
- virtual void ActivationEvents() override {
+ void ActivationEvents() override {
ActivateWindowById(1);
ScopedFocusNotificationObserver root_observer(root_window());
@@ -589,7 +581,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
observer1.ExpectCounts(1, 1);
observer2.ExpectCounts(1, 1);
}
- virtual void ReactivationEvents() override {
+ void ReactivationEvents() override {
ActivateWindowById(1);
ScopedFocusNotificationObserver root_observer(root_window());
EXPECT_EQ(0, root_observer.reactivation_count());
@@ -603,7 +595,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
EXPECT_EQ(root_window()->GetChildById(1),
root_observer.reactivation_actual_window());
}
- virtual void DuplicateActivationEvents() override {
+ void DuplicateActivationEvents() override {
// Activating an existing active window should not resend activation events.
ActivateWindowById(1);
@@ -625,7 +617,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
observer1.ExpectCounts(1, 1);
observer2.ExpectCounts(1, 1);
}
- virtual void ShiftFocusWithinActiveWindow() override {
+ void ShiftFocusWithinActiveWindow() override {
ActivateWindowById(1);
EXPECT_EQ(1, GetActiveWindowId());
EXPECT_EQ(1, GetFocusedWindowId());
@@ -634,7 +626,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
FocusWindowById(12);
EXPECT_EQ(12, GetFocusedWindowId());
}
- virtual void ShiftFocusToChildOfInactiveWindow() override {
+ void ShiftFocusToChildOfInactiveWindow() override {
ActivateWindowById(2);
EXPECT_EQ(2, GetActiveWindowId());
EXPECT_EQ(2, GetFocusedWindowId());
@@ -642,7 +634,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
EXPECT_EQ(1, GetActiveWindowId());
EXPECT_EQ(11, GetFocusedWindowId());
}
- virtual void ShiftFocusToParentOfFocusedWindow() override {
+ void ShiftFocusToParentOfFocusedWindow() override {
ActivateWindowById(1);
EXPECT_EQ(1, GetFocusedWindowId());
FocusWindowById(11);
@@ -651,7 +643,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
// Focus should _not_ shift to the parent of the already-focused window.
EXPECT_EQ(11, GetFocusedWindowId());
}
- virtual void FocusRulesOverride() override {
+ void FocusRulesOverride() override {
EXPECT_EQ(NULL, GetFocusedWindow());
FocusWindowById(11);
EXPECT_EQ(11, GetFocusedWindowId());
@@ -667,7 +659,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
FocusWindowById(12);
EXPECT_EQ(12, GetFocusedWindowId());
}
- virtual void ActivationRulesOverride() override {
+ void ActivationRulesOverride() override {
ActivateWindowById(1);
EXPECT_EQ(1, GetActiveWindowId());
EXPECT_EQ(1, GetFocusedWindowId());
@@ -687,7 +679,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
EXPECT_EQ(2, GetActiveWindowId());
EXPECT_EQ(2, GetFocusedWindowId());
}
- virtual void ShiftFocusOnActivation() override {
+ void ShiftFocusOnActivation() override {
// When a window is activated, by default that window is also focused.
// An ActivationChangeObserver may shift focus to another window within the
// same activatable window.
@@ -729,7 +721,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
ActivateWindowById(1);
EXPECT_EQ(1, GetFocusedWindowId());
}
- virtual void ShiftFocusOnActivationDueToHide() override {
+ void ShiftFocusOnActivationDueToHide() override {
// Similar to ShiftFocusOnActivation except the activation change is
// triggered by hiding the active window.
ActivateWindowById(1);
@@ -755,12 +747,12 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
client->RemoveObserver(observer.get());
}
- virtual void NoShiftActiveOnActivation() override {
+ void NoShiftActiveOnActivation() override {
// When a window is activated, we need to prevent any change to activation
// from being made in response to an activation change notification.
}
- virtual void NoFocusChangeOnClickOnCaptureWindow() override {
+ void NoFocusChangeOnClickOnCaptureWindow() override {
scoped_ptr<aura::client::DefaultCaptureClient> capture_client(
new aura::client::DefaultCaptureClient(root_window()));
// Clicking on a window which has capture should not cause a focus change
@@ -781,7 +773,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
}
// Verifies focus change is honored while capture held.
- virtual void ChangeFocusWhenNothingFocusedAndCaptured() override {
+ void ChangeFocusWhenNothingFocusedAndCaptured() override {
scoped_ptr<aura::client::DefaultCaptureClient> capture_client(
new aura::client::DefaultCaptureClient(root_window()));
aura::Window* w1 = root_window()->GetChildById(1);
@@ -800,7 +792,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
// Verifies if a window that loses activation or focus is deleted during
// observer notification we don't pass the deleted window to other observers.
- virtual void DontPassDeletedWindow() override {
+ void DontPassDeletedWindow() override {
FocusWindowById(1);
EXPECT_EQ(1, GetActiveWindowId());
@@ -839,7 +831,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
// Verifies if the focused text input client is cleared when a window gains
// or loses the focus.
- virtual void FocusedTextInputClient() override {
+ void FocusedTextInputClient() override {
ui::TextInputFocusManager* text_input_focus_manager =
ui::TextInputFocusManager::GetInstance();
ui::DummyTextInputClient text_input_client;
@@ -883,16 +875,14 @@ class FocusControllerApiTest : public FocusControllerDirectTestBase {
private:
// Overridden from FocusControllerTestBase:
- virtual void FocusWindowDirect(aura::Window* window) override {
- FocusWindow(window);
- }
- virtual void ActivateWindowDirect(aura::Window* window) override {
+ void FocusWindowDirect(aura::Window* window) override { FocusWindow(window); }
+ void ActivateWindowDirect(aura::Window* window) override {
ActivateWindow(window);
}
- virtual void DeactivateWindowDirect(aura::Window* window) override {
+ void DeactivateWindowDirect(aura::Window* window) override {
DeactivateWindow(window);
}
- virtual bool IsInputEvent() override { return false; }
+ bool IsInputEvent() override { return false; }
DISALLOW_COPY_AND_ASSIGN(FocusControllerApiTest);
};
@@ -921,21 +911,21 @@ class FocusControllerMouseEventTest : public FocusControllerDirectTestBase {
private:
// Overridden from FocusControllerTestBase:
- virtual void FocusWindowDirect(aura::Window* window) override {
+ void FocusWindowDirect(aura::Window* window) override {
ui::test::EventGenerator generator(root_window(), window);
generator.ClickLeftButton();
}
- virtual void ActivateWindowDirect(aura::Window* window) override {
+ void ActivateWindowDirect(aura::Window* window) override {
ui::test::EventGenerator generator(root_window(), window);
generator.ClickLeftButton();
}
- virtual void DeactivateWindowDirect(aura::Window* window) override {
+ void DeactivateWindowDirect(aura::Window* window) override {
aura::Window* next_activatable =
test_focus_rules()->GetNextActivatableWindow(window);
ui::test::EventGenerator generator(root_window(), next_activatable);
generator.ClickLeftButton();
}
- virtual bool IsInputEvent() override { return true; }
+ bool IsInputEvent() override { return true; }
DISALLOW_COPY_AND_ASSIGN(FocusControllerMouseEventTest);
};
@@ -946,21 +936,21 @@ class FocusControllerGestureEventTest : public FocusControllerDirectTestBase {
private:
// Overridden from FocusControllerTestBase:
- virtual void FocusWindowDirect(aura::Window* window) override {
+ void FocusWindowDirect(aura::Window* window) override {
ui::test::EventGenerator generator(root_window(), window);
generator.GestureTapAt(window->bounds().CenterPoint());
}
- virtual void ActivateWindowDirect(aura::Window* window) override {
+ void ActivateWindowDirect(aura::Window* window) override {
ui::test::EventGenerator generator(root_window(), window);
generator.GestureTapAt(window->bounds().CenterPoint());
}
- virtual void DeactivateWindowDirect(aura::Window* window) override {
+ void DeactivateWindowDirect(aura::Window* window) override {
aura::Window* next_activatable =
test_focus_rules()->GetNextActivatableWindow(window);
ui::test::EventGenerator generator(root_window(), next_activatable);
generator.GestureTapAt(window->bounds().CenterPoint());
}
- virtual bool IsInputEvent() override { return true; }
+ bool IsInputEvent() override { return true; }
DISALLOW_COPY_AND_ASSIGN(FocusControllerGestureEventTest);
};
@@ -984,7 +974,7 @@ class FocusControllerImplicitTestBase : public FocusControllerTestBase {
virtual void PostDispostionChangeExpectations() {}
// Overridden from FocusControllerTestBase:
- virtual void BasicFocus() override {
+ void BasicFocus() override {
EXPECT_EQ(NULL, GetFocusedWindow());
aura::Window* w211 = root_window()->GetChildById(211);
@@ -995,7 +985,7 @@ class FocusControllerImplicitTestBase : public FocusControllerTestBase {
// BasicFocusRules passes focus to the parent.
EXPECT_EQ(parent_ ? 2 : 21, GetFocusedWindowId());
}
- virtual void BasicActivation() override {
+ void BasicActivation() override {
DCHECK(!parent_) << "Activation tests don't support parent changes.";
EXPECT_EQ(NULL, GetActiveWindow());
@@ -1008,7 +998,7 @@ class FocusControllerImplicitTestBase : public FocusControllerTestBase {
EXPECT_EQ(3, GetActiveWindowId());
PostDispostionChangeExpectations();
}
- virtual void FocusEvents() override {
+ void FocusEvents() override {
aura::Window* w211 = root_window()->GetChildById(211);
FocusWindow(w211);
@@ -1021,7 +1011,7 @@ class FocusControllerImplicitTestBase : public FocusControllerTestBase {
root_observer.ExpectCounts(0, 1);
observer211.ExpectCounts(0, 1);
}
- virtual void ActivationEvents() override {
+ void ActivationEvents() override {
DCHECK(!parent_) << "Activation tests don't support parent changes.";
aura::Window* w2 = root_window()->GetChildById(2);
@@ -1039,7 +1029,7 @@ class FocusControllerImplicitTestBase : public FocusControllerTestBase {
observer2.ExpectCounts(1, 1);
observer3.ExpectCounts(1, 1);
}
- virtual void FocusRulesOverride() override {
+ void FocusRulesOverride() override {
EXPECT_EQ(NULL, GetFocusedWindow());
aura::Window* w211 = root_window()->GetChildById(211);
FocusWindow(w211);
@@ -1053,7 +1043,7 @@ class FocusControllerImplicitTestBase : public FocusControllerTestBase {
test_focus_rules()->set_focus_restriction(NULL);
}
- virtual void ActivationRulesOverride() override {
+ void ActivationRulesOverride() override {
DCHECK(!parent_) << "Activation tests don't support parent changes.";
aura::Window* w1 = root_window()->GetChildById(1);
@@ -1096,7 +1086,7 @@ class FocusControllerHideTest : public FocusControllerImplicitTestBase {
: FocusControllerImplicitTestBase(parent) {}
// Overridden from FocusControllerImplicitTestBase:
- virtual void ChangeWindowDisposition(aura::Window* window) override {
+ void ChangeWindowDisposition(aura::Window* window) override {
GetDispositionWindow(window)->Hide();
}
@@ -1124,7 +1114,7 @@ class FocusControllerDestructionTest : public FocusControllerImplicitTestBase {
: FocusControllerImplicitTestBase(parent) {}
// Overridden from FocusControllerImplicitTestBase:
- virtual void ChangeWindowDisposition(aura::Window* window) override {
+ void ChangeWindowDisposition(aura::Window* window) override {
delete GetDispositionWindow(window);
}
@@ -1153,12 +1143,12 @@ class FocusControllerRemovalTest : public FocusControllerImplicitTestBase {
: FocusControllerImplicitTestBase(parent) {}
// Overridden from FocusControllerImplicitTestBase:
- virtual void ChangeWindowDisposition(aura::Window* window) override {
+ void ChangeWindowDisposition(aura::Window* window) override {
aura::Window* disposition_window = GetDispositionWindow(window);
disposition_window->parent()->RemoveChild(disposition_window);
window_owner_.reset(disposition_window);
}
- virtual void TearDown() override {
+ void TearDown() override {
window_owner_.reset();
FocusControllerImplicitTestBase::TearDown();
}
diff --git a/ui/wm/core/image_grid.h b/ui/wm/core/image_grid.h
index 6102f8b..b3cf2e1 100644
--- a/ui/wm/core/image_grid.h
+++ b/ui/wm/core/image_grid.h
@@ -130,18 +130,17 @@ class WM_EXPORT ImageGrid {
class ImagePainter : public ui::LayerDelegate {
public:
ImagePainter(const gfx::ImageSkia& image) : image_(image) {}
- virtual ~ImagePainter() {}
+ ~ImagePainter() override {}
// Clips |layer| to |clip_rect|. Triggers a repaint if the clipping
// rectangle has changed. An empty rectangle disables clipping.
void SetClipRect(const gfx::Rect& clip_rect, ui::Layer* layer);
// ui::LayerDelegate implementation:
- virtual void OnPaintLayer(gfx::Canvas* canvas) override;
- virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) override;
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
- virtual base::Closure PrepareForLayerBoundsChange() override;
+ void OnPaintLayer(gfx::Canvas* canvas) override;
+ void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override;
+ void OnDeviceScaleFactorChanged(float device_scale_factor) override;
+ base::Closure PrepareForLayerBoundsChange() override;
private:
friend class TestAPI;
diff --git a/ui/wm/core/input_method_event_filter.h b/ui/wm/core/input_method_event_filter.h
index d658d77..c6bd65a 100644
--- a/ui/wm/core/input_method_event_filter.h
+++ b/ui/wm/core/input_method_event_filter.h
@@ -27,7 +27,7 @@ class WM_EXPORT InputMethodEventFilter
public ui::internal::InputMethodDelegate {
public:
explicit InputMethodEventFilter(gfx::AcceleratedWidget widget);
- virtual ~InputMethodEventFilter();
+ ~InputMethodEventFilter() override;
void SetInputMethodPropertyInRootWindow(aura::Window* root_window);
@@ -35,10 +35,10 @@ class WM_EXPORT InputMethodEventFilter
private:
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) override;
+ void OnKeyEvent(ui::KeyEvent* event) override;
// Overridden from ui::internal::InputMethodDelegate:
- virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override;
+ bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override;
scoped_ptr<ui::InputMethod> input_method_;
diff --git a/ui/wm/core/input_method_event_filter_unittest.cc b/ui/wm/core/input_method_event_filter_unittest.cc
index 9a2d31b..5da0358 100644
--- a/ui/wm/core/input_method_event_filter_unittest.cc
+++ b/ui/wm/core/input_method_event_filter_unittest.cc
@@ -33,7 +33,7 @@ class TestTextInputClient : public ui::DummyTextInputClient {
public:
explicit TestTextInputClient(aura::Window* window) : window_(window) {}
- virtual aura::Window* GetAttachedWindow() const override { return window_; }
+ aura::Window* GetAttachedWindow() const override { return window_; }
private:
aura::Window* window_;
@@ -44,10 +44,10 @@ class TestTextInputClient : public ui::DummyTextInputClient {
class InputMethodEventFilterTest : public aura::test::AuraTestBase {
public:
InputMethodEventFilterTest() {}
- virtual ~InputMethodEventFilterTest() {}
+ ~InputMethodEventFilterTest() override {}
// testing::Test overrides:
- virtual void SetUp() override {
+ void SetUp() override {
aura::test::AuraTestBase::SetUp();
root_window()->AddPreTargetHandler(&root_filter_);
@@ -66,7 +66,7 @@ class InputMethodEventFilterTest : public aura::test::AuraTestBase {
test_input_client_.get());
}
- virtual void TearDown() override {
+ void TearDown() override {
test_window_.reset();
root_filter_.RemoveHandler(&test_filter_);
root_filter_.RemoveHandler(input_method_event_filter_.get());
diff --git a/ui/wm/core/masked_window_targeter.h b/ui/wm/core/masked_window_targeter.h
index e289329..cc209f3 100644
--- a/ui/wm/core/masked_window_targeter.h
+++ b/ui/wm/core/masked_window_targeter.h
@@ -17,7 +17,7 @@ namespace wm {
class WM_EXPORT MaskedWindowTargeter : public aura::WindowTargeter {
public:
explicit MaskedWindowTargeter(aura::Window* masked_window);
- virtual ~MaskedWindowTargeter();
+ ~MaskedWindowTargeter() override;
protected:
// Sets the hit-test mask for |window| in |mask| (in |window|'s local
@@ -25,9 +25,8 @@ class WM_EXPORT MaskedWindowTargeter : public aura::WindowTargeter {
virtual bool GetHitTestMask(aura::Window* window, gfx::Path* mask) const = 0;
// ui::EventTargeter:
- virtual bool EventLocationInsideBounds(
- ui::EventTarget* target,
- const ui::LocatedEvent& event) const override;
+ bool EventLocationInsideBounds(ui::EventTarget* target,
+ const ui::LocatedEvent& event) const override;
private:
aura::Window* masked_window_;
diff --git a/ui/wm/core/nested_accelerator_controller.h b/ui/wm/core/nested_accelerator_controller.h
index 1eca937..70cb6c1 100644
--- a/ui/wm/core/nested_accelerator_controller.h
+++ b/ui/wm/core/nested_accelerator_controller.h
@@ -23,13 +23,12 @@ class WM_EXPORT NestedAcceleratorController
: public aura::client::DispatcherClient {
public:
explicit NestedAcceleratorController(NestedAcceleratorDelegate* delegate);
- virtual ~NestedAcceleratorController();
+ ~NestedAcceleratorController() override;
// aura::client::DispatcherClient:
- virtual void PrepareNestedLoopClosures(
- base::MessagePumpDispatcher* dispatcher,
- base::Closure* run_closure,
- base::Closure* quit_closure) override;
+ void PrepareNestedLoopClosures(base::MessagePumpDispatcher* dispatcher,
+ base::Closure* run_closure,
+ base::Closure* quit_closure) override;
private:
void RunNestedMessageLoop(scoped_ptr<base::RunLoop> run_loop,
diff --git a/ui/wm/core/nested_accelerator_controller_unittest.cc b/ui/wm/core/nested_accelerator_controller_unittest.cc
index ce548d5..968bcba 100644
--- a/ui/wm/core/nested_accelerator_controller_unittest.cc
+++ b/ui/wm/core/nested_accelerator_controller_unittest.cc
@@ -40,10 +40,10 @@ class MockDispatcher : public ui::PlatformEventDispatcher {
private:
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override {
+ bool CanDispatchEvent(const ui::PlatformEvent& event) override {
return true;
}
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override {
+ uint32_t DispatchEvent(const ui::PlatformEvent& event) override {
if (ui::EventTypeFromNative(event) == ui::ET_KEY_RELEASED)
num_key_events_dispatched_++;
return ui::POST_DISPATCH_NONE;
@@ -57,16 +57,16 @@ class MockDispatcher : public ui::PlatformEventDispatcher {
class TestTarget : public ui::AcceleratorTarget {
public:
TestTarget() : accelerator_pressed_count_(0) {}
- virtual ~TestTarget() {}
+ ~TestTarget() override {}
int accelerator_pressed_count() const { return accelerator_pressed_count_; }
// Overridden from ui::AcceleratorTarget:
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override {
+ bool AcceleratorPressed(const ui::Accelerator& accelerator) override {
accelerator_pressed_count_++;
return true;
}
- virtual bool CanHandleAccelerators() const override { return true; }
+ bool CanHandleAccelerators() const override { return true; }
private:
int accelerator_pressed_count_;
@@ -101,11 +101,10 @@ class MockNestedAcceleratorDelegate : public NestedAcceleratorDelegate {
public:
MockNestedAcceleratorDelegate()
: accelerator_manager_(new ui::AcceleratorManager) {}
- virtual ~MockNestedAcceleratorDelegate() {}
+ ~MockNestedAcceleratorDelegate() override {}
// NestedAcceleratorDelegate:
- virtual Result ProcessAccelerator(
- const ui::Accelerator& accelerator) override {
+ Result ProcessAccelerator(const ui::Accelerator& accelerator) override {
return accelerator_manager_->Process(accelerator) ?
RESULT_PROCESSED : RESULT_NOT_PROCESSED;
}
@@ -125,9 +124,9 @@ class MockNestedAcceleratorDelegate : public NestedAcceleratorDelegate {
class NestedAcceleratorTest : public aura::test::AuraTestBase {
public:
NestedAcceleratorTest() {}
- virtual ~NestedAcceleratorTest() {}
+ ~NestedAcceleratorTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
AuraTestBase::SetUp();
delegate_ = new MockNestedAcceleratorDelegate();
nested_accelerator_controller_.reset(
@@ -136,7 +135,7 @@ class NestedAcceleratorTest : public aura::test::AuraTestBase {
nested_accelerator_controller_.get());
}
- virtual void TearDown() override {
+ void TearDown() override {
aura::client::SetDispatcherClient(root_window(), NULL);
AuraTestBase::TearDown();
delegate_ = NULL;
diff --git a/ui/wm/core/nested_accelerator_dispatcher_linux.cc b/ui/wm/core/nested_accelerator_dispatcher_linux.cc
index 16a4efb..bc0f49c 100644
--- a/ui/wm/core/nested_accelerator_dispatcher_linux.cc
+++ b/ui/wm/core/nested_accelerator_dispatcher_linux.cc
@@ -51,20 +51,20 @@ class NestedAcceleratorDispatcherLinux : public NestedAcceleratorDispatcher,
: NestedAcceleratorDispatcher(delegate),
restore_dispatcher_(OverrideDispatcher(this)) {}
- virtual ~NestedAcceleratorDispatcherLinux() {}
+ ~NestedAcceleratorDispatcherLinux() override {}
private:
// AcceleratorDispatcher:
- virtual scoped_ptr<base::RunLoop> CreateRunLoop() override {
+ scoped_ptr<base::RunLoop> CreateRunLoop() override {
return scoped_ptr<base::RunLoop>(new base::RunLoop());
}
// ui::PlatformEventDispatcher:
- virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override {
+ bool CanDispatchEvent(const ui::PlatformEvent& event) override {
return true;
}
- virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override {
+ uint32_t DispatchEvent(const ui::PlatformEvent& event) override {
if (IsKeyEvent(event)) {
ui::KeyEvent key_event(event);
ui::Accelerator accelerator = CreateAcceleratorFromKeyEvent(key_event);
diff --git a/ui/wm/core/shadow.h b/ui/wm/core/shadow.h
index 19f5972..69f3065 100644
--- a/ui/wm/core/shadow.h
+++ b/ui/wm/core/shadow.h
@@ -34,7 +34,7 @@ class WM_EXPORT Shadow : public ui::ImplicitAnimationObserver {
};
Shadow();
- virtual ~Shadow();
+ ~Shadow() override;
void Init(Style style);
@@ -54,7 +54,7 @@ class WM_EXPORT Shadow : public ui::ImplicitAnimationObserver {
void SetStyle(Style style);
// ui::ImplicitAnimationObserver overrides:
- virtual void OnImplicitAnimationsCompleted() override;
+ void OnImplicitAnimationsCompleted() override;
private:
// Updates the shadow images to the current |style_|.
diff --git a/ui/wm/core/shadow_controller.cc b/ui/wm/core/shadow_controller.cc
index abd33ad..99bfadf 100644
--- a/ui/wm/core/shadow_controller.cc
+++ b/ui/wm/core/shadow_controller.cc
@@ -97,16 +97,16 @@ class ShadowController::Impl :
static Impl* GetInstance();
// aura::EnvObserver override:
- virtual void OnWindowInitialized(aura::Window* window) override;
+ void OnWindowInitialized(aura::Window* window) override;
// aura::WindowObserver overrides:
- virtual void OnWindowPropertyChanged(
- aura::Window* window, const void* key, intptr_t old) override;
- virtual void OnWindowBoundsChanged(
- aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override;
- virtual void OnWindowDestroyed(aura::Window* window) override;
+ void OnWindowPropertyChanged(aura::Window* window,
+ const void* key,
+ intptr_t old) override;
+ void OnWindowBoundsChanged(aura::Window* window,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
+ void OnWindowDestroyed(aura::Window* window) override;
private:
friend class base::RefCounted<Impl>;
@@ -116,7 +116,7 @@ class ShadowController::Impl :
typedef std::map<aura::Window*, linked_ptr<Shadow> > WindowShadowMap;
Impl();
- virtual ~Impl();
+ ~Impl() override;
// Forwarded from ShadowController.
void OnWindowActivated(aura::Window* gained_active,
diff --git a/ui/wm/core/shadow_controller.h b/ui/wm/core/shadow_controller.h
index 9deeda6..360a997 100644
--- a/ui/wm/core/shadow_controller.h
+++ b/ui/wm/core/shadow_controller.h
@@ -48,11 +48,11 @@ class WM_EXPORT ShadowController :
};
explicit ShadowController(aura::client::ActivationClient* activation_client);
- virtual ~ShadowController();
+ ~ShadowController() override;
// aura::client::ActivationChangeObserver overrides:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) override;
+ void OnWindowActivated(aura::Window* gained_active,
+ aura::Window* lost_active) override;
private:
class Impl;
diff --git a/ui/wm/core/shadow_controller_unittest.cc b/ui/wm/core/shadow_controller_unittest.cc
index 1b1aa18..18116d4 100644
--- a/ui/wm/core/shadow_controller_unittest.cc
+++ b/ui/wm/core/shadow_controller_unittest.cc
@@ -25,9 +25,9 @@ namespace wm {
class ShadowControllerTest : public aura::test::AuraTestBase {
public:
ShadowControllerTest() {}
- virtual ~ShadowControllerTest() {}
+ ~ShadowControllerTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
wm_state_.reset(new wm::WMState);
AuraTestBase::SetUp();
new wm::DefaultActivationClient(root_window());
@@ -35,7 +35,7 @@ class ShadowControllerTest : public aura::test::AuraTestBase {
aura::client::GetActivationClient(root_window());
shadow_controller_.reset(new ShadowController(activation_client));
}
- virtual void TearDown() override {
+ void TearDown() override {
shadow_controller_.reset();
AuraTestBase::TearDown();
wm_state_.reset();
diff --git a/ui/wm/core/shadow_unittest.cc b/ui/wm/core/shadow_unittest.cc
index 2ffdd4a..10f4495 100644
--- a/ui/wm/core/shadow_unittest.cc
+++ b/ui/wm/core/shadow_unittest.cc
@@ -35,20 +35,18 @@ class MockResourceBundleDelegate : public ui::ResourceBundle::Delegate {
image_small_ = gfx::Image::CreateFrom1xBitmap(bitmap_small);
image_large_ = gfx::Image::CreateFrom1xBitmap(bitmap_large);
}
- virtual ~MockResourceBundleDelegate() {}
+ ~MockResourceBundleDelegate() override {}
// ResourceBundle::Delegate:
- virtual base::FilePath GetPathForResourcePack(
- const base::FilePath& pack_path,
- ui::ScaleFactor scale_factor) override {
+ base::FilePath GetPathForResourcePack(const base::FilePath& pack_path,
+ ui::ScaleFactor scale_factor) override {
return base::FilePath();
}
- virtual base::FilePath GetPathForLocalePack(
- const base::FilePath& pack_path,
- const std::string& locale) override {
+ base::FilePath GetPathForLocalePack(const base::FilePath& pack_path,
+ const std::string& locale) override {
return base::FilePath();
}
- virtual gfx::Image GetImageNamed(int resource_id) override {
+ gfx::Image GetImageNamed(int resource_id) override {
last_resource_id_ = resource_id;
switch (resource_id) {
case IDR_WINDOW_BUBBLE_SHADOW_SMALL:
@@ -61,25 +59,24 @@ class MockResourceBundleDelegate : public ui::ResourceBundle::Delegate {
return gfx::Image();
}
}
- virtual gfx::Image GetNativeImageNamed(
- int resource_id, ui::ResourceBundle::ImageRTL rtl) override {
+ gfx::Image GetNativeImageNamed(int resource_id,
+ ui::ResourceBundle::ImageRTL rtl) override {
return gfx::Image();
}
- virtual base::RefCountedStaticMemory* LoadDataResourceBytes(
- int resource_id, ui::ScaleFactor scale_factor) override {
+ base::RefCountedStaticMemory* LoadDataResourceBytes(
+ int resource_id,
+ ui::ScaleFactor scale_factor) override {
return NULL;
}
- virtual bool GetRawDataResource(
- int resource_id, ui::ScaleFactor scale_factor,
- base::StringPiece* value) override {
+ bool GetRawDataResource(int resource_id,
+ ui::ScaleFactor scale_factor,
+ base::StringPiece* value) override {
return false;
}
- virtual bool GetLocalizedString(
- int message_id, base::string16* value) override {
+ bool GetLocalizedString(int message_id, base::string16* value) override {
return false;
}
- virtual scoped_ptr<gfx::Font> GetFont(
- ui::ResourceBundle::FontStyle style) override {
+ scoped_ptr<gfx::Font> GetFont(ui::ResourceBundle::FontStyle style) override {
return scoped_ptr<gfx::Font>();
}
@@ -98,12 +95,12 @@ class MockResourceBundleDelegate : public ui::ResourceBundle::Delegate {
class ShadowTest: public aura::test::AuraTestBase {
public:
ShadowTest() {}
- virtual ~ShadowTest() {}
+ ~ShadowTest() override {}
MockResourceBundleDelegate* delegate() { return delegate_.get(); }
// aura::testAuraBase:
- virtual void SetUp() override {
+ void SetUp() override {
aura::test::AuraTestBase::SetUp();
delegate_.reset(new MockResourceBundleDelegate());
if (ResourceBundle::HasSharedInstance())
@@ -111,7 +108,7 @@ class ShadowTest: public aura::test::AuraTestBase {
ui::ResourceBundle::InitSharedInstanceWithLocale(
"en-US", delegate(), ui::ResourceBundle::LOAD_COMMON_RESOURCES);
}
- virtual void TearDown() override {
+ void TearDown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::FilePath ui_test_pak_path;
ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
diff --git a/ui/wm/core/transient_window_controller.h b/ui/wm/core/transient_window_controller.h
index 4322b41..0dcf989 100644
--- a/ui/wm/core/transient_window_controller.h
+++ b/ui/wm/core/transient_window_controller.h
@@ -16,16 +16,13 @@ class WM_EXPORT TransientWindowController
: public aura::client::TransientWindowClient {
public:
TransientWindowController();
- virtual ~TransientWindowController();
+ ~TransientWindowController() override;
// TransientWindowClient:
- virtual void AddTransientChild(aura::Window* parent,
- aura::Window* child) override;
- virtual void RemoveTransientChild(aura::Window* parent,
- aura::Window* child) override;
- virtual aura::Window* GetTransientParent(aura::Window* window) override;
- virtual const aura::Window* GetTransientParent(
- const aura::Window* window) override;
+ void AddTransientChild(aura::Window* parent, aura::Window* child) override;
+ void RemoveTransientChild(aura::Window* parent, aura::Window* child) override;
+ aura::Window* GetTransientParent(aura::Window* window) override;
+ const aura::Window* GetTransientParent(const aura::Window* window) override;
private:
DISALLOW_COPY_AND_ASSIGN(TransientWindowController);
diff --git a/ui/wm/core/transient_window_manager.h b/ui/wm/core/transient_window_manager.h
index a6c5139..9973cd0 100644
--- a/ui/wm/core/transient_window_manager.h
+++ b/ui/wm/core/transient_window_manager.h
@@ -32,7 +32,7 @@ class WM_EXPORT TransientWindowManager : public aura::WindowObserver {
public:
typedef std::vector<aura::Window*> Windows;
- virtual ~TransientWindowManager();
+ ~TransientWindowManager() override;
// Returns the TransientWindowManager for |window|. This never returns NULL.
static TransientWindowManager* Get(aura::Window* window);
@@ -80,14 +80,12 @@ class WM_EXPORT TransientWindowManager : public aura::WindowObserver {
void UpdateTransientChildVisibility(bool visible);
// WindowObserver:
- virtual void OnWindowParentChanged(aura::Window* window,
- aura::Window* parent) override;
- virtual void OnWindowVisibilityChanging(aura::Window* window,
- bool visible) override;
- virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) override;
- virtual void OnWindowStackingChanged(aura::Window* window) override;
- virtual void OnWindowDestroying(aura::Window* window) override;
+ void OnWindowParentChanged(aura::Window* window,
+ aura::Window* parent) override;
+ void OnWindowVisibilityChanging(aura::Window* window, bool visible) override;
+ void OnWindowVisibilityChanged(aura::Window* window, bool visible) override;
+ void OnWindowStackingChanged(aura::Window* window) override;
+ void OnWindowDestroying(aura::Window* window) override;
aura::Window* window_;
aura::Window* transient_parent_;
diff --git a/ui/wm/core/transient_window_manager_unittest.cc b/ui/wm/core/transient_window_manager_unittest.cc
index 79d2559..93f7bc7 100644
--- a/ui/wm/core/transient_window_manager_unittest.cc
+++ b/ui/wm/core/transient_window_manager_unittest.cc
@@ -26,19 +26,16 @@ class TestTransientWindowObserver : public TransientWindowObserver {
TestTransientWindowObserver() : add_count_(0), remove_count_(0) {
}
- virtual ~TestTransientWindowObserver() {
- }
+ ~TestTransientWindowObserver() override {}
int add_count() const { return add_count_; }
int remove_count() const { return remove_count_; }
// TransientWindowObserver overrides:
- virtual void OnTransientChildAdded(Window* window,
- Window* transient) override {
+ void OnTransientChildAdded(Window* window, Window* transient) override {
add_count_++;
}
- virtual void OnTransientChildRemoved(Window* window,
- Window* transient) override {
+ void OnTransientChildRemoved(Window* window, Window* transient) override {
remove_count_++;
}
@@ -52,14 +49,14 @@ class TestTransientWindowObserver : public TransientWindowObserver {
class TransientWindowManagerTest : public aura::test::AuraTestBase {
public:
TransientWindowManagerTest() {}
- virtual ~TransientWindowManagerTest() {}
+ ~TransientWindowManagerTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
AuraTestBase::SetUp();
wm_state_.reset(new wm::WMState);
}
- virtual void TearDown() override {
+ void TearDown() override {
wm_state_.reset();
AuraTestBase::TearDown();
}
@@ -349,7 +346,7 @@ class DestroyedTrackingDelegate : public aura::test::TestWindowDelegate {
: name_(name),
results_(results) {}
- virtual void OnWindowDestroyed(aura::Window* window) override {
+ void OnWindowDestroyed(aura::Window* window) override {
results_->push_back(name_);
}
@@ -457,17 +454,15 @@ class StackingMadrigalLayoutManager : public aura::LayoutManager {
: root_window_(root_window) {
root_window_->SetLayoutManager(this);
}
- virtual ~StackingMadrigalLayoutManager() {
- }
+ ~StackingMadrigalLayoutManager() override {}
private:
// Overridden from LayoutManager:
- virtual void OnWindowResized() override {}
- virtual void OnWindowAddedToLayout(Window* child) override {}
- virtual void OnWillRemoveWindowFromLayout(Window* child) override {}
- virtual void OnWindowRemovedFromLayout(Window* child) override {}
- virtual void OnChildWindowVisibilityChanged(Window* child,
- bool visible) override {
+ void OnWindowResized() override {}
+ void OnWindowAddedToLayout(Window* child) override {}
+ void OnWillRemoveWindowFromLayout(Window* child) override {}
+ void OnWindowRemovedFromLayout(Window* child) override {}
+ void OnChildWindowVisibilityChanged(Window* child, bool visible) override {
Window::Windows::const_iterator it = root_window_->children().begin();
Window* last_window = NULL;
for (; it != root_window_->children().end(); ++it) {
@@ -481,8 +476,8 @@ class StackingMadrigalLayoutManager : public aura::LayoutManager {
last_window = *it;
}
}
- virtual void SetChildBounds(Window* child,
- const gfx::Rect& requested_bounds) override {
+ void SetChildBounds(Window* child,
+ const gfx::Rect& requested_bounds) override {
SetChildBoundsDirect(child, requested_bounds);
}
@@ -497,8 +492,7 @@ class StackingMadrigalVisibilityClient : public aura::client::VisibilityClient {
: ignored_window_(NULL) {
aura::client::SetVisibilityClient(root_window, this);
}
- virtual ~StackingMadrigalVisibilityClient() {
- }
+ ~StackingMadrigalVisibilityClient() override {}
void set_ignored_window(Window* ignored_window) {
ignored_window_ = ignored_window;
@@ -506,7 +500,7 @@ class StackingMadrigalVisibilityClient : public aura::client::VisibilityClient {
private:
// Overridden from client::VisibilityClient:
- virtual void UpdateLayerVisibility(Window* window, bool visible) override {
+ void UpdateLayerVisibility(Window* window, bool visible) override {
if (!visible) {
if (window == ignored_window_)
window->layer()->set_delegate(NULL);
diff --git a/ui/wm/core/transient_window_stacking_client.h b/ui/wm/core/transient_window_stacking_client.h
index ce9d55c..77a129f 100644
--- a/ui/wm/core/transient_window_stacking_client.h
+++ b/ui/wm/core/transient_window_stacking_client.h
@@ -16,12 +16,12 @@ class WM_EXPORT TransientWindowStackingClient
: public aura::client::WindowStackingClient {
public:
TransientWindowStackingClient();
- virtual ~TransientWindowStackingClient();
+ ~TransientWindowStackingClient() override;
// WindowStackingClient:
- virtual bool AdjustStacking(aura::Window** child,
- aura::Window** target,
- aura::Window::StackDirection* direction) override;
+ bool AdjustStacking(aura::Window** child,
+ aura::Window** target,
+ aura::Window::StackDirection* direction) override;
private:
// Purely for DCHECKs.
diff --git a/ui/wm/core/transient_window_stacking_client_unittest.cc b/ui/wm/core/transient_window_stacking_client_unittest.cc
index c067496..23a99e7 100644
--- a/ui/wm/core/transient_window_stacking_client_unittest.cc
+++ b/ui/wm/core/transient_window_stacking_client_unittest.cc
@@ -19,15 +19,15 @@ namespace wm {
class TransientWindowStackingClientTest : public aura::test::AuraTestBase {
public:
TransientWindowStackingClientTest() {}
- virtual ~TransientWindowStackingClientTest() {}
+ ~TransientWindowStackingClientTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
AuraTestBase::SetUp();
client_.reset(new TransientWindowStackingClient);
aura::client::SetWindowStackingClient(client_.get());
}
- virtual void TearDown() override {
+ void TearDown() override {
aura::client::SetWindowStackingClient(NULL);
AuraTestBase::TearDown();
}
diff --git a/ui/wm/core/user_activity_detector.h b/ui/wm/core/user_activity_detector.h
index 7e5db9f..0b92bc3 100644
--- a/ui/wm/core/user_activity_detector.h
+++ b/ui/wm/core/user_activity_detector.h
@@ -27,7 +27,7 @@ class WM_EXPORT UserActivityDetector : public ui::EventHandler {
static const int kDisplayPowerChangeIgnoreMouseMs;
UserActivityDetector();
- virtual ~UserActivityDetector();
+ ~UserActivityDetector() override;
base::TimeTicks last_activity_time() const { return last_activity_time_; }
@@ -41,11 +41,11 @@ class WM_EXPORT UserActivityDetector : public ui::EventHandler {
void OnDisplayPowerChanging();
// ui::EventHandler implementation.
- virtual void OnKeyEvent(ui::KeyEvent* event) override;
- virtual void OnMouseEvent(ui::MouseEvent* event) override;
- virtual void OnScrollEvent(ui::ScrollEvent* event) override;
- virtual void OnTouchEvent(ui::TouchEvent* event) override;
- virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ void OnKeyEvent(ui::KeyEvent* event) override;
+ void OnMouseEvent(ui::MouseEvent* event) override;
+ void OnScrollEvent(ui::ScrollEvent* event) override;
+ void OnTouchEvent(ui::TouchEvent* event) override;
+ void OnGestureEvent(ui::GestureEvent* event) override;
private:
// Returns |now_for_test_| if set or base::TimeTicks::Now() otherwise.
diff --git a/ui/wm/core/user_activity_detector_unittest.cc b/ui/wm/core/user_activity_detector_unittest.cc
index 0273093..71e1f2d 100644
--- a/ui/wm/core/user_activity_detector_unittest.cc
+++ b/ui/wm/core/user_activity_detector_unittest.cc
@@ -26,9 +26,7 @@ class TestUserActivityObserver : public UserActivityObserver {
void reset_stats() { num_invocations_ = 0; }
// UserActivityObserver implementation.
- virtual void OnUserActivity(const ui::Event* event) override {
- num_invocations_++;
- }
+ void OnUserActivity(const ui::Event* event) override { num_invocations_++; }
private:
// Number of times that OnUserActivity() has been called.
@@ -40,9 +38,9 @@ class TestUserActivityObserver : public UserActivityObserver {
class UserActivityDetectorTest : public aura::test::AuraTestBase {
public:
UserActivityDetectorTest() {}
- virtual ~UserActivityDetectorTest() {}
+ ~UserActivityDetectorTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
AuraTestBase::SetUp();
observer_.reset(new TestUserActivityObserver);
detector_.reset(new UserActivityDetector);
@@ -52,7 +50,7 @@ class UserActivityDetectorTest : public aura::test::AuraTestBase {
detector_->set_now_for_test(now_);
}
- virtual void TearDown() override {
+ void TearDown() override {
detector_->RemoveObserver(observer_.get());
AuraTestBase::TearDown();
}
diff --git a/ui/wm/core/visibility_controller.h b/ui/wm/core/visibility_controller.h
index d29a6da..c6f5258 100644
--- a/ui/wm/core/visibility_controller.h
+++ b/ui/wm/core/visibility_controller.h
@@ -16,7 +16,7 @@ class WM_EXPORT VisibilityController
: public aura::client::VisibilityClient {
public:
VisibilityController();
- virtual ~VisibilityController();
+ ~VisibilityController() override;
protected:
// Subclasses override if they want to call a different implementation of
@@ -28,8 +28,7 @@ class WM_EXPORT VisibilityController
private:
// Overridden from aura::client::VisibilityClient:
- virtual void UpdateLayerVisibility(aura::Window* window,
- bool visible) override;
+ void UpdateLayerVisibility(aura::Window* window, bool visible) override;
DISALLOW_COPY_AND_ASSIGN(VisibilityController);
};
diff --git a/ui/wm/core/window_animations.cc b/ui/wm/core/window_animations.cc
index c523c98..03bb1b9 100644
--- a/ui/wm/core/window_animations.cc
+++ b/ui/wm/core/window_animations.cc
@@ -63,18 +63,18 @@ class HidingWindowAnimationObserverBase : public aura::WindowObserver {
: window_(window) {
window_->AddObserver(this);
}
- virtual ~HidingWindowAnimationObserverBase() {
+ ~HidingWindowAnimationObserverBase() override {
if (window_)
window_->RemoveObserver(this);
}
// aura::WindowObserver:
- virtual void OnWindowDestroying(aura::Window* window) override {
+ void OnWindowDestroying(aura::Window* window) override {
DCHECK_EQ(window, window_);
WindowInvalid();
}
- virtual void OnWindowDestroyed(aura::Window* window) override {
+ void OnWindowDestroyed(aura::Window* window) override {
DCHECK_EQ(window, window_);
WindowInvalid();
}
@@ -165,10 +165,10 @@ class ImplicitHidingWindowAnimationObserver
ImplicitHidingWindowAnimationObserver(
aura::Window* window,
ui::ScopedLayerAnimationSettings* settings);
- virtual ~ImplicitHidingWindowAnimationObserver() {}
+ ~ImplicitHidingWindowAnimationObserver() override {}
// ui::ImplicitAnimationObserver:
- virtual void OnImplicitAnimationsCompleted() override;
+ void OnImplicitAnimationsCompleted() override;
private:
DISALLOW_COPY_AND_ASSIGN(ImplicitHidingWindowAnimationObserver);
@@ -400,7 +400,7 @@ class RotateHidingWindowAnimationObserver
public:
explicit RotateHidingWindowAnimationObserver(aura::Window* window)
: HidingWindowAnimationObserverBase(window) {}
- virtual ~RotateHidingWindowAnimationObserver() {}
+ ~RotateHidingWindowAnimationObserver() override {}
// Destroys itself after |last_sequence| ends or is aborted. Does not take
// ownership of |last_sequence|, which should not be NULL.
@@ -409,15 +409,13 @@ class RotateHidingWindowAnimationObserver
}
// ui::LayerAnimationObserver:
- virtual void OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) override {
+ void OnLayerAnimationEnded(ui::LayerAnimationSequence* sequence) override {
OnAnimationCompleted();
}
- virtual void OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) override {
+ void OnLayerAnimationAborted(ui::LayerAnimationSequence* sequence) override {
OnAnimationCompleted();
}
- virtual void OnLayerAnimationScheduled(
+ void OnLayerAnimationScheduled(
ui::LayerAnimationSequence* sequence) override {}
private:
diff --git a/ui/wm/core/window_animations_unittest.cc b/ui/wm/core/window_animations_unittest.cc
index b1db736..095ea02 100644
--- a/ui/wm/core/window_animations_unittest.cc
+++ b/ui/wm/core/window_animations_unittest.cc
@@ -47,9 +47,7 @@ class WindowAnimationsTest : public aura::test::AuraTestBase {
public:
WindowAnimationsTest() {}
- virtual void TearDown() override {
- AuraTestBase::TearDown();
- }
+ void TearDown() override { AuraTestBase::TearDown(); }
private:
DISALLOW_COPY_AND_ASSIGN(WindowAnimationsTest);
@@ -255,16 +253,13 @@ TEST_F(WindowAnimationsTest, HideAnimationDetachLayersWithTransientChildren) {
class NotifyHideCompletedAnimationHost : public aura::client::AnimationHost {
public:
NotifyHideCompletedAnimationHost() : hide_completed_(false) {}
- virtual ~NotifyHideCompletedAnimationHost() {}
+ ~NotifyHideCompletedAnimationHost() override {}
// Overridden from TestWindowDelegate:
- virtual void OnWindowHidingAnimationCompleted() override {
- hide_completed_ = true;
- }
+ void OnWindowHidingAnimationCompleted() override { hide_completed_ = true; }
- virtual void SetHostTransitionOffsets(
- const gfx::Vector2d& top_left,
- const gfx::Vector2d& bottom_right) override {}
+ void SetHostTransitionOffsets(const gfx::Vector2d& top_left,
+ const gfx::Vector2d& bottom_right) override {}
bool hide_completed() const { return hide_completed_; }
diff --git a/ui/wm/core/window_modality_controller.h b/ui/wm/core/window_modality_controller.h
index 33386ce..1b3baaf 100644
--- a/ui/wm/core/window_modality_controller.h
+++ b/ui/wm/core/window_modality_controller.h
@@ -35,23 +35,22 @@ class WM_EXPORT WindowModalityController : public ui::EventHandler,
public aura::WindowObserver {
public:
explicit WindowModalityController(ui::EventTarget* event_target);
- virtual ~WindowModalityController();
+ ~WindowModalityController() override;
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) override;
- virtual void OnMouseEvent(ui::MouseEvent* event) override;
- virtual void OnTouchEvent(ui::TouchEvent* event) override;
+ void OnKeyEvent(ui::KeyEvent* event) override;
+ void OnMouseEvent(ui::MouseEvent* event) override;
+ void OnTouchEvent(ui::TouchEvent* event) override;
// Overridden from aura::EnvObserver:
- virtual void OnWindowInitialized(aura::Window* window) override;
+ void OnWindowInitialized(aura::Window* window) override;
// Overridden from aura::WindowObserver:
- virtual void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) override;
- virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) override;
- virtual void OnWindowDestroyed(aura::Window* window) override;
+ void OnWindowPropertyChanged(aura::Window* window,
+ const void* key,
+ intptr_t old) override;
+ void OnWindowVisibilityChanged(aura::Window* window, bool visible) override;
+ void OnWindowDestroyed(aura::Window* window) override;
private:
// Processes a mouse/touch event, and returns true if the event should be
diff --git a/ui/wm/public/scoped_tooltip_disabler.h b/ui/wm/public/scoped_tooltip_disabler.h
index 1022788..82d9879 100644
--- a/ui/wm/public/scoped_tooltip_disabler.h
+++ b/ui/wm/public/scoped_tooltip_disabler.h
@@ -17,14 +17,14 @@ class AURA_EXPORT ScopedTooltipDisabler : aura::WindowObserver {
// are reenabled from the destructor when there are no most outstanding
// ScopedTooltipDisablers for |window|.
explicit ScopedTooltipDisabler(aura::Window* window);
- virtual ~ScopedTooltipDisabler();
+ ~ScopedTooltipDisabler() override;
private:
// Reenables the tooltips on the TooltipClient.
void EnableTooltips();
// aura::WindowObserver:
- virtual void OnWindowDestroying(aura::Window* window) override;
+ void OnWindowDestroying(aura::Window* window) override;
// The RootWindow to disable Tooltips on; NULL if the Window passed to the
// constructor was not in a root or the root has been destroyed.
diff --git a/ui/wm/test/run_all_unittests.cc b/ui/wm/test/run_all_unittests.cc
index a0ac59d..ebc0d51 100644
--- a/ui/wm/test/run_all_unittests.cc
+++ b/ui/wm/test/run_all_unittests.cc
@@ -18,7 +18,7 @@ class WMTestSuite : public base::TestSuite {
WMTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
protected:
- virtual void Initialize() override {
+ void Initialize() override {
base::TestSuite::Initialize();
gfx::GLSurface::InitializeOneOffForTests();
ui::RegisterPathProvider();
@@ -28,7 +28,7 @@ class WMTestSuite : public base::TestSuite {
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
- virtual void Shutdown() override {
+ void Shutdown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
diff --git a/ui/wm/test/wm_test_helper.h b/ui/wm/test/wm_test_helper.h
index 990b478..9b92e28 100644
--- a/ui/wm/test/wm_test_helper.h
+++ b/ui/wm/test/wm_test_helper.h
@@ -40,14 +40,14 @@ class WMTestHelper : public aura::client::WindowTreeClient {
public:
WMTestHelper(const gfx::Size& default_window_size,
ui::ContextFactory* context_factory);
- virtual ~WMTestHelper();
+ ~WMTestHelper() override;
aura::WindowTreeHost* host() { return host_.get(); }
// Overridden from client::WindowTreeClient:
- virtual aura::Window* GetDefaultParent(aura::Window* context,
- aura::Window* window,
- const gfx::Rect& bounds) override;
+ aura::Window* GetDefaultParent(aura::Window* context,
+ aura::Window* window,
+ const gfx::Rect& bounds) override;
private:
scoped_ptr<aura::WindowTreeHost> host_;