diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 03:53:27 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 03:53:27 +0000 |
commit | 792b9b17fc2a2399062ff801ad4fc9814ad5f133 (patch) | |
tree | a18db13983feeba1332290d5e644dfe9e5ef62dc /ash/wm/app_list_controller.cc | |
parent | 499c7fd28b97645052d01d2fae2b99be171756e8 (diff) | |
download | chromium_src-792b9b17fc2a2399062ff801ad4fc9814ad5f133.zip chromium_src-792b9b17fc2a2399062ff801ad4fc9814ad5f133.tar.gz chromium_src-792b9b17fc2a2399062ff801ad4fc9814ad5f133.tar.bz2 |
Consolidates activation and focus change observers a bit.
Focus observation @ target -> FocusChangeObserver set on target instead of WindowDelegate methods.
Activation observation @ target -> ActivationChangeObserver set on target instead of ActivationDelegate methods.
Changes FocusChange notifications to be sent regardless of whether or not focus is being cleared.
Changes signature of both observers to carry gaining and losing focus/activation.
http://crbug.com/162100
R=sky@chromium.org
Review URL: https://codereview.chromium.org/11490015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172258 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/app_list_controller.cc')
-rw-r--r-- | ash/wm/app_list_controller.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc index 012a7c5..3c52d77 100644 --- a/ash/wm/app_list_controller.cc +++ b/ash/wm/app_list_controller.cc @@ -247,12 +247,14 @@ void AppListController::OnGestureEvent(ui::GestureEvent* event) { //////////////////////////////////////////////////////////////////////////////// // AppListController, aura::FocusObserver implementation: -void AppListController::OnWindowFocused(aura::Window* window) { - if (view_ && is_visible_) { + +void AppListController::OnWindowFocused(aura::Window* gained_focus, + aura::Window* lost_focus) { + if (gained_focus && view_ && is_visible_) { aura::Window* applist_container = Shell::GetContainer( Shell::GetPrimaryRootWindow(), kShellWindowId_AppListContainer); - if (window->parent() != applist_container) + if (gained_focus->parent() != applist_container) SetVisible(false); } } |