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

Side by Side Diff: ash/app_list/app_list.cc

Issue 10071026: ash: Don't dismiss app list on bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698