OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/app_list/app_list.h" | 5 #include "ash/app_list/app_list.h" |
6 | 6 |
7 #include "ash/app_list/app_list_view.h" | 7 #include "ash/app_list/app_list_view.h" |
8 #include "ash/app_list/icon_cache.h" | 8 #include "ash/app_list/icon_cache.h" |
9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 void AppList::OnWidgetClosing(views::Widget* widget) { | 256 void AppList::OnWidgetClosing(views::Widget* widget) { |
257 DCHECK(view_->GetWidget() == widget); | 257 DCHECK(view_->GetWidget() == widget); |
258 if (is_visible_) | 258 if (is_visible_) |
259 SetVisible(false); | 259 SetVisible(false); |
260 ResetView(); | 260 ResetView(); |
261 } | 261 } |
262 | 262 |
263 void AppList::OnWidgetActivationChanged(views::Widget* widget, bool active) { | 263 void AppList::OnWidgetActivationChanged(views::Widget* widget, bool active) { |
264 DCHECK(view_->GetWidget() == widget); | 264 DCHECK(view_->GetWidget() == widget); |
265 if (view_ && is_visible_ && !active) { | 265 if (view_ && is_visible_ && !active) { |
266 aura::Window* self = view_->GetWidget()->GetNativeWindow(); | 266 aura::Window* applist_container = Shell::GetInstance()->GetContainer( |
| 267 internal::kShellWindowId_AppListContainer); |
| 268 aura::Window* bubble_container = Shell::GetInstance()->GetContainer( |
| 269 internal::kShellWindowId_SettingBubbleContainer); |
267 aura::Window* active_window = ash::wm::GetActiveWindow(); | 270 aura::Window* active_window = ash::wm::GetActiveWindow(); |
268 if (active_window->parent() != self->parent()) | 271 if (active_window->parent() != applist_container && |
| 272 active_window->parent() != bubble_container) { |
269 SetVisible(false); | 273 SetVisible(false); |
| 274 } |
270 } | 275 } |
271 } | 276 } |
272 | 277 |
273 } // namespace internal | 278 } // namespace internal |
274 } // namespace ash | 279 } // namespace ash |
OLD | NEW |