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

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

Issue 12313118: Refactor: Shelf Widget (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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
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/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/activation_controller_delegate.h" 10 #include "ash/wm/activation_controller_delegate.h"
(...skipping 25 matching lines...) Expand all
36 kShellWindowId_LockScreenContainer, 36 kShellWindowId_LockScreenContainer,
37 kShellWindowId_SystemModalContainer, 37 kShellWindowId_SystemModalContainer,
38 kShellWindowId_AlwaysOnTopContainer, 38 kShellWindowId_AlwaysOnTopContainer,
39 kShellWindowId_AppListContainer, 39 kShellWindowId_AppListContainer,
40 kShellWindowId_DefaultContainer, 40 kShellWindowId_DefaultContainer,
41 41
42 // Panel, launcher and status are intentionally checked after other 42 // Panel, launcher and status are intentionally checked after other
43 // containers even though these layers are higher. The user expects their 43 // containers even though these layers are higher. The user expects their
44 // windows to be focused before these elements. 44 // windows to be focused before these elements.
45 kShellWindowId_PanelContainer, 45 kShellWindowId_PanelContainer,
46 kShellWindowId_LauncherContainer, 46 kShellWindowId_ShelfContainer,
47 kShellWindowId_StatusContainer, 47 kShellWindowId_StatusContainer,
48 }; 48 };
49 49
50 bool BelongsToContainerWithEqualOrGreaterId(const aura::Window* window, 50 bool BelongsToContainerWithEqualOrGreaterId(const aura::Window* window,
51 int container_id) { 51 int container_id) {
52 for (; window; window = window->parent()) { 52 for (; window; window = window->parent()) {
53 if (window->id() >= container_id) 53 if (window->id() >= container_id)
54 return true; 54 return true;
55 } 55 }
56 return false; 56 return false;
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 aura::Window* window = static_cast<aura::Window*>(event->target()); 423 aura::Window* window = static_cast<aura::Window*>(event->target());
424 window = delegate_->WillFocusWindow(window); 424 window = delegate_->WillFocusWindow(window);
425 if (GetActiveWindow() != window) { 425 if (GetActiveWindow() != window) {
426 aura::client::GetFocusClient(window)->FocusWindow( 426 aura::client::GetFocusClient(window)->FocusWindow(
427 FindFocusableWindowFor(window)); 427 FindFocusableWindowFor(window));
428 } 428 }
429 } 429 }
430 430
431 } // namespace internal 431 } // namespace internal
432 } // namespace ash 432 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698