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

Unified Diff: ui/wm/public/activation_change_observer.h

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
« no previous file with comments | « ui/wm/core/shadow_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/public/activation_change_observer.h
diff --git a/ui/wm/public/activation_change_observer.h b/ui/wm/public/activation_change_observer.h
index 68d5b8a742acedbc5c99bd19867bb41d67f63a17..930f12f8679d646e8f0443192e0c954bda888004 100644
--- a/ui/wm/public/activation_change_observer.h
+++ b/ui/wm/public/activation_change_observer.h
@@ -14,11 +14,23 @@ namespace client {
class AURA_EXPORT ActivationChangeObserver {
public:
+ // The reason or cause of a window activation change.
+ enum class ActivationReason {
+ // When a window is activated due to a call to the ActivationClient API.
+ kActivationClient,
sky 2015/06/02 15:43:03 In chrome we don't use this style for enums, we us
bruthig 2015/06/03 21:59:31 Done.
+ // When a user clicks or taps a window in the 2-dimensional screen space.
+ kInputEvent,
+ // When a new window is activated as a side effect of a window
+ // disposition changing.
+ kWindowDispositionChanged,
+ };
+
// Called when |active| gains focus, or there is no active window
// (|active| is NULL in this case.) |old_active| refers to the
// previous active window or NULL if there was no previously active
- // window.
- virtual void OnWindowActivated(Window* gained_active,
+ // window. |reason| specifies the cause of the activation change.
+ virtual void OnWindowActivated(ActivationReason reason,
+ Window* gained_active,
Window* lost_active) = 0;
// Called when during window activation the currently active window is
« no previous file with comments | « ui/wm/core/shadow_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698