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

Unified Diff: ui/wm/core/focus_controller_unittest.cc

Issue 1153633006: Added UMA statistics for changing the active window via click or touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reworked approach to use the an ActivationChangeObserver. Created 5 years, 7 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
Index: ui/wm/core/focus_controller_unittest.cc
diff --git a/ui/wm/core/focus_controller_unittest.cc b/ui/wm/core/focus_controller_unittest.cc
index 84c691ff37caaec37f8c0f321313ded5b24a5c0d..11c935071598e2ca7108d33a977d50dfefbc4290 100644
--- a/ui/wm/core/focus_controller_unittest.cc
+++ b/ui/wm/core/focus_controller_unittest.cc
@@ -56,7 +56,8 @@ class FocusNotificationObserver : public aura::client::ActivationChangeObserver,
private:
// Overridden from aura::client::ActivationChangeObserver:
- void OnWindowActivated(aura::Window* gained_active,
+ void OnWindowActivated(ActivationReason reason,
+ aura::Window* gained_active,
aura::Window* lost_active) override {
++activation_changed_count_;
}
@@ -115,7 +116,8 @@ class RecordingActivationAndFocusChangeObserver
}
// Overridden from aura::client::ActivationChangeObserver:
- void OnWindowActivated(aura::Window* gained_active,
+ void OnWindowActivated(ActivationReason reason,
+ aura::Window* gained_active,
aura::Window* lost_active) override {
if (lost_active && lost_active == deleter_->GetDeletedWindow())
was_notified_with_deleted_window_ = true;
@@ -158,7 +160,8 @@ class DeleteOnLoseActivationChangeObserver :
}
// Overridden from aura::client::ActivationChangeObserver:
- void OnWindowActivated(aura::Window* gained_active,
+ void OnWindowActivated(ActivationReason reason,
+ aura::Window* gained_active,
aura::Window* lost_active) override {
if (window_ && lost_active == window_) {
delete lost_active;
@@ -303,7 +306,8 @@ class FocusShiftingActivationObserver
private:
// Overridden from aura::client::ActivationChangeObserver:
- void OnWindowActivated(aura::Window* gained_active,
+ void OnWindowActivated(ActivationReason reason,
+ 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().

Powered by Google App Engine
This is Rietveld 408576698