| 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/shell.h" | 5 #include "ash/shell.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/accelerators/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 "AlwaysOnTopContainer", | 164 "AlwaysOnTopContainer", |
| 165 non_lock_screen_containers); | 165 non_lock_screen_containers); |
| 166 always_on_top_container->SetEventFilter( | 166 always_on_top_container->SetEventFilter( |
| 167 new ToplevelWindowEventFilter(always_on_top_container)); | 167 new ToplevelWindowEventFilter(always_on_top_container)); |
| 168 SetChildWindowVisibilityChangesAnimated(always_on_top_container); | 168 SetChildWindowVisibilityChangesAnimated(always_on_top_container); |
| 169 | 169 |
| 170 CreateContainer(internal::kShellWindowId_PanelContainer, | 170 CreateContainer(internal::kShellWindowId_PanelContainer, |
| 171 "PanelContainer", | 171 "PanelContainer", |
| 172 non_lock_screen_containers); | 172 non_lock_screen_containers); |
| 173 | 173 |
| 174 CreateContainer(internal::kShellWindowId_AppListContainer, | 174 // V1 Applist container is below launcher container. |
| 175 "AppListContainer", | 175 bool use_v2_applist = internal::AppListController::UseAppListV2(); |
| 176 non_lock_screen_containers); | 176 if (!use_v2_applist) { |
| 177 CreateContainer(internal::kShellWindowId_AppListContainer, |
| 178 "AppListContainer", |
| 179 non_lock_screen_containers); |
| 180 } |
| 177 | 181 |
| 178 CreateContainer(internal::kShellWindowId_LauncherContainer, | 182 CreateContainer(internal::kShellWindowId_LauncherContainer, |
| 179 "LauncherContainer", | 183 "LauncherContainer", |
| 180 non_lock_screen_containers); | 184 non_lock_screen_containers); |
| 181 | 185 |
| 186 // V2 Applist container is above launcher container. |
| 187 if (use_v2_applist) { |
| 188 CreateContainer(internal::kShellWindowId_AppListContainer, |
| 189 "AppListContainer", |
| 190 non_lock_screen_containers); |
| 191 } |
| 192 |
| 182 aura::Window* modal_container = CreateContainer( | 193 aura::Window* modal_container = CreateContainer( |
| 183 internal::kShellWindowId_SystemModalContainer, | 194 internal::kShellWindowId_SystemModalContainer, |
| 184 "SystemModalContainer", | 195 "SystemModalContainer", |
| 185 non_lock_screen_containers); | 196 non_lock_screen_containers); |
| 186 modal_container->SetEventFilter( | 197 modal_container->SetEventFilter( |
| 187 new ToplevelWindowEventFilter(modal_container)); | 198 new ToplevelWindowEventFilter(modal_container)); |
| 188 modal_container->SetLayoutManager( | 199 modal_container->SetLayoutManager( |
| 189 new internal::SystemModalContainerLayoutManager(modal_container)); | 200 new internal::SystemModalContainerLayoutManager(modal_container)); |
| 190 SetChildWindowVisibilityChangesAnimated(modal_container); | 201 SetChildWindowVisibilityChangesAnimated(modal_container); |
| 191 | 202 |
| (...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 panel_container->SetLayoutManager(panel_layout_manager_); | 1065 panel_container->SetLayoutManager(panel_layout_manager_); |
| 1055 } | 1066 } |
| 1056 } | 1067 } |
| 1057 | 1068 |
| 1058 void Shell::DisableWorkspaceGridLayout() { | 1069 void Shell::DisableWorkspaceGridLayout() { |
| 1059 if (workspace_controller_.get()) | 1070 if (workspace_controller_.get()) |
| 1060 workspace_controller_->workspace_manager()->set_grid_size(0); | 1071 workspace_controller_->workspace_manager()->set_grid_size(0); |
| 1061 } | 1072 } |
| 1062 | 1073 |
| 1063 } // namespace ash | 1074 } // namespace ash |
| OLD | NEW |