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

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

Issue 13896026: Stick windows to sides of workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dock with zero width (some tests disabled on Windows) Created 7 years, 6 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 21 matching lines...) Expand all
32 // that need to be activated in the order that they should be activated. 32 // that need to be activated in the order that they should be activated.
33 const int kWindowContainerIds[] = { 33 const int kWindowContainerIds[] = {
34 kShellWindowId_LockSystemModalContainer, 34 kShellWindowId_LockSystemModalContainer,
35 kShellWindowId_SettingBubbleContainer, 35 kShellWindowId_SettingBubbleContainer,
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
sky 2013/06/12 21:50:17 nit: add docked here too.
varkha 2013/06/13 05:02:11 Done.
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_DockContainer,
45 kShellWindowId_PanelContainer, 46 kShellWindowId_PanelContainer,
46 kShellWindowId_ShelfContainer, 47 kShellWindowId_ShelfContainer,
47 kShellWindowId_StatusContainer, 48 kShellWindowId_StatusContainer,
48 }; 49 };
49 50
50 bool BelongsToContainerWithEqualOrGreaterId(const aura::Window* window, 51 bool BelongsToContainerWithEqualOrGreaterId(const aura::Window* window,
51 int container_id) { 52 int container_id) {
52 for (; window; window = window->parent()) { 53 for (; window; window = window->parent()) {
53 if (window->id() >= container_id) 54 if (window->id() >= container_id)
54 return true; 55 return true;
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 aura::Window* window = static_cast<aura::Window*>(event->target()); 424 aura::Window* window = static_cast<aura::Window*>(event->target());
424 window = delegate_->WillFocusWindow(window); 425 window = delegate_->WillFocusWindow(window);
425 if (GetActiveWindow() != window) { 426 if (GetActiveWindow() != window) {
426 aura::client::GetFocusClient(window)->FocusWindow( 427 aura::client::GetFocusClient(window)->FocusWindow(
427 FindFocusableWindowFor(window)); 428 FindFocusableWindowFor(window));
428 } 429 }
429 } 430 }
430 431
431 } // namespace internal 432 } // namespace internal
432 } // namespace ash 433 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698