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

Unified Diff: ash/wm/overview/window_selector.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: ash/wm/overview/window_selector.cc
diff --git a/ash/wm/overview/window_selector.cc b/ash/wm/overview/window_selector.cc
index 91458cf78042f4f653578f93402f1c0b018cbe96..9ad6a91ab6008787581d77d14592e54b68bd41fd 100644
--- a/ash/wm/overview/window_selector.cc
+++ b/ash/wm/overview/window_selector.cc
@@ -505,8 +505,10 @@ void WindowSelector::OnWindowDestroying(aura::Window* window) {
restore_focus_window_ = nullptr;
}
-void WindowSelector::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
+void WindowSelector::OnWindowActivated(
+ aura::client::ActivationChangeObserver::ActivationReason reason,
+ aura::Window* gained_active,
+ aura::Window* lost_active) {
if (ignore_activations_ ||
!gained_active ||
gained_active == text_filter_widget_->GetNativeWindow()) {
@@ -534,7 +536,9 @@ void WindowSelector::OnWindowActivated(aura::Window* gained_active,
void WindowSelector::OnAttemptToReactivateWindow(aura::Window* request_active,
aura::Window* actual_active) {
- OnWindowActivated(request_active, actual_active);
+ OnWindowActivated(aura::client::ActivationChangeObserver::ActivationReason::
+ kActivationClient,
+ request_active, actual_active);
}
void WindowSelector::ContentsChanged(views::Textfield* sender,

Powered by Google App Engine
This is Rietveld 408576698