diff options
author | bruthig <bruthig@chromium.org> | 2015-06-05 08:33:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-05 15:33:59 +0000 |
commit | 5681d88c96e685a4e469105e8fcb382dc9893c9a (patch) | |
tree | 8b3dea83daba769e1cdf9f4c9b3f46dadd7d09c3 /ui/wm/public | |
parent | 74f13dc2b62abb34e947093fe2600f9c539e60ef (diff) | |
download | chromium_src-5681d88c96e685a4e469105e8fcb382dc9893c9a.zip chromium_src-5681d88c96e685a4e469105e8fcb382dc9893c9a.tar.gz chromium_src-5681d88c96e685a4e469105e8fcb382dc9893c9a.tar.bz2 |
Added an ActivationReason parameter to ActivationChangeObserver::OnWindowActivated(...).
TEST=FocusControllerApiTest.DuplicateActivationEvents
TEST=FocusControllerApiTest.ActivationEvents
TEST=FocusControllerMouseEventTest.DuplicateActivationEvents
TEST=FocusControllerMouseEventTest.ActivationEvents
TEST=FocusControllerGestureEventTest.DuplicateActivationEvents
TEST=FocusControllerGestureEventTest.ActivationEvents
TEST=FocusControllerHideTest.ActivationEvents
TEST=FocusControllerDestructionTest.ActivationEvents
TEST=FocusControllerRemovalTest.ActivationEvents
BUG=489813, 489814
Review URL: https://codereview.chromium.org/1151133003
Cr-Commit-Position: refs/heads/master@{#333048}
Diffstat (limited to 'ui/wm/public')
-rw-r--r-- | ui/wm/public/activation_change_observer.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/ui/wm/public/activation_change_observer.h b/ui/wm/public/activation_change_observer.h index 68d5b8a..57f9d27 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: - // Called when |active| gains focus, or there is no active window - // (|active| is NULL in this case.) |old_active| refers to the + // 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. + ACTIVATION_CLIENT, + // When a user clicks or taps a window in the 2-dimensional screen space. + INPUT_EVENT, + // When a new window is activated as a side effect of a window + // disposition changing. + WINDOW_DISPOSITION_CHANGED, + }; + + // Called when |gained_active| gains focus, or there is no active window + // (|gained_active| is NULL in this case.) |lost_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 |