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

Unified Diff: ui/wm/core/focus_controller.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
Index: ui/wm/core/focus_controller.h
diff --git a/ui/wm/core/focus_controller.h b/ui/wm/core/focus_controller.h
index 43d3c608b2138493f070bce4150b24a073edca58..95eac70892f5d0ce914c9e59dc9dad48cfee81ca 100644
--- a/ui/wm/core/focus_controller.h
+++ b/ui/wm/core/focus_controller.h
@@ -12,6 +12,7 @@
#include "ui/aura/client/focus_client.h"
#include "ui/aura/window_observer.h"
#include "ui/events/event_handler.h"
+#include "ui/wm/public/activation_change_observer.h"
#include "ui/wm/public/activation_client.h"
#include "ui/wm/wm_export.h"
@@ -85,8 +86,10 @@ class WM_EXPORT FocusController : public aura::client::ActivationClient,
// request (e.g. FocusWindow or ActivateWindow). It may be NULL, e.g. if
// SetActiveWindow was not called by an external request. |activatable_window|
// refers to the actual window to be activated, which may be different.
- void SetActiveWindow(aura::Window* requested_window,
- aura::Window* activatable_window);
+ void SetActiveWindow(
+ aura::client::ActivationChangeObserver::ActivationReason reason,
+ aura::Window* requested_window,
+ aura::Window* activatable_window);
// Called when a window's disposition changed such that it and its hierarchy
// are no longer focusable/activatable. |next| is a valid window that is used
@@ -99,6 +102,10 @@ class WM_EXPORT FocusController : public aura::client::ActivationClient,
// for the input window.
void WindowFocusedFromInputEvent(aura::Window* window);
+ void FocusWindowImpl(
+ aura::client::ActivationChangeObserver::ActivationReason reason,
+ aura::Window* window);
+
aura::Window* active_window_;
aura::Window* focused_window_;

Powered by Google App Engine
This is Rietveld 408576698