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

Side by Side Diff: ash/wm/activation_controller.cc

Issue 9596002: ash uber tray: Make it work in ash_shell, and a couple more fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 | « ash/system/tray/system_tray.cc ('k') | 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/wm/activation_controller.h" 5 #include "ash/wm/activation_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/wm/window_modality_controller.h" 9 #include "ash/wm/window_modality_controller.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 17 matching lines...) Expand all
28 // Returns true if children of |window| can be activated. 28 // Returns true if children of |window| can be activated.
29 // These are the only containers in which windows can receive focus. 29 // These are the only containers in which windows can receive focus.
30 bool SupportsChildActivation(aura::Window* window) { 30 bool SupportsChildActivation(aura::Window* window) {
31 return window->id() == kShellWindowId_DefaultContainer || 31 return window->id() == kShellWindowId_DefaultContainer ||
32 window->id() == kShellWindowId_AlwaysOnTopContainer || 32 window->id() == kShellWindowId_AlwaysOnTopContainer ||
33 window->id() == kShellWindowId_PanelContainer || 33 window->id() == kShellWindowId_PanelContainer ||
34 window->id() == kShellWindowId_SystemModalContainer || 34 window->id() == kShellWindowId_SystemModalContainer ||
35 window->id() == kShellWindowId_StatusContainer || 35 window->id() == kShellWindowId_StatusContainer ||
36 window->id() == kShellWindowId_LauncherContainer || 36 window->id() == kShellWindowId_LauncherContainer ||
37 window->id() == kShellWindowId_LockScreenContainer || 37 window->id() == kShellWindowId_LockScreenContainer ||
38 window->id() == kShellWindowId_LockSystemModalContainer; 38 window->id() == kShellWindowId_LockSystemModalContainer ||
39 window->id() == kShellWindowId_SettingBubbleContainer;
39 } 40 }
40 41
41 // Returns true if |window| can be activated or deactivated. 42 // Returns true if |window| can be activated or deactivated.
42 // A window manager typically defines some notion of "top level window" that 43 // A window manager typically defines some notion of "top level window" that
43 // supports activation/deactivation. 44 // supports activation/deactivation.
44 bool CanActivateWindow(aura::Window* window) { 45 bool CanActivateWindow(aura::Window* window) {
45 return window && 46 return window &&
46 window->IsVisible() && 47 window->IsVisible() &&
47 (!aura::client::GetActivationDelegate(window) || 48 (!aura::client::GetActivationDelegate(window) ||
48 aura::client::GetActivationDelegate(window)->ShouldActivate(NULL)) && 49 aura::client::GetActivationDelegate(window)->ShouldActivate(NULL)) &&
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 ++i) { 222 ++i) {
222 if (*i != ignore && CanActivateWindow(*i)) 223 if (*i != ignore && CanActivateWindow(*i))
223 return *i; 224 return *i;
224 } 225 }
225 } 226 }
226 return NULL; 227 return NULL;
227 } 228 }
228 229
229 } // namespace internal 230 } // namespace internal
230 } // namespace ash 231 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698