| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 "AlwaysOnTopContainer", | 165 "AlwaysOnTopContainer", |
| 166 non_lock_screen_containers); | 166 non_lock_screen_containers); |
| 167 always_on_top_container->SetEventFilter( | 167 always_on_top_container->SetEventFilter( |
| 168 new ToplevelWindowEventFilter(always_on_top_container)); | 168 new ToplevelWindowEventFilter(always_on_top_container)); |
| 169 SetChildWindowVisibilityChangesAnimated(always_on_top_container); | 169 SetChildWindowVisibilityChangesAnimated(always_on_top_container); |
| 170 | 170 |
| 171 CreateContainer(internal::kShellWindowId_PanelContainer, | 171 CreateContainer(internal::kShellWindowId_PanelContainer, |
| 172 "PanelContainer", | 172 "PanelContainer", |
| 173 non_lock_screen_containers); | 173 non_lock_screen_containers); |
| 174 | 174 |
| 175 // V1 Applist container is below launcher container. | |
| 176 bool use_v2_applist = internal::AppListController::UseAppListV2(); | |
| 177 if (!use_v2_applist) { | |
| 178 CreateContainer(internal::kShellWindowId_AppListContainer, | |
| 179 "AppListContainer", | |
| 180 non_lock_screen_containers); | |
| 181 } | |
| 182 | |
| 183 CreateContainer(internal::kShellWindowId_LauncherContainer, | 175 CreateContainer(internal::kShellWindowId_LauncherContainer, |
| 184 "LauncherContainer", | 176 "LauncherContainer", |
| 185 non_lock_screen_containers); | 177 non_lock_screen_containers); |
| 186 | 178 |
| 187 // V2 Applist container is above launcher container. | 179 CreateContainer(internal::kShellWindowId_AppListContainer, |
| 188 if (use_v2_applist) { | 180 "AppListContainer", |
| 189 CreateContainer(internal::kShellWindowId_AppListContainer, | 181 non_lock_screen_containers); |
| 190 "AppListContainer", | |
| 191 non_lock_screen_containers); | |
| 192 } | |
| 193 | 182 |
| 194 aura::Window* modal_container = CreateContainer( | 183 aura::Window* modal_container = CreateContainer( |
| 195 internal::kShellWindowId_SystemModalContainer, | 184 internal::kShellWindowId_SystemModalContainer, |
| 196 "SystemModalContainer", | 185 "SystemModalContainer", |
| 197 non_lock_screen_containers); | 186 non_lock_screen_containers); |
| 198 modal_container->SetEventFilter( | 187 modal_container->SetEventFilter( |
| 199 new ToplevelWindowEventFilter(modal_container)); | 188 new ToplevelWindowEventFilter(modal_container)); |
| 200 modal_container->SetLayoutManager( | 189 modal_container->SetLayoutManager( |
| 201 new internal::SystemModalContainerLayoutManager(modal_container)); | 190 new internal::SystemModalContainerLayoutManager(modal_container)); |
| 202 SetChildWindowVisibilityChangesAnimated(modal_container); | 191 SetChildWindowVisibilityChangesAnimated(modal_container); |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 void Shell::SetCursor(gfx::NativeCursor cursor) { | 1065 void Shell::SetCursor(gfx::NativeCursor cursor) { |
| 1077 // TODO(oshima): set cursor to all root windows. | 1066 // TODO(oshima): set cursor to all root windows. |
| 1078 GetPrimaryRootWindow()->SetCursor(cursor); | 1067 GetPrimaryRootWindow()->SetCursor(cursor); |
| 1079 } | 1068 } |
| 1080 | 1069 |
| 1081 void Shell::ShowCursor(bool visible) { | 1070 void Shell::ShowCursor(bool visible) { |
| 1082 GetPrimaryRootWindow()->ShowCursor(visible); | 1071 GetPrimaryRootWindow()->ShowCursor(visible); |
| 1083 } | 1072 } |
| 1084 | 1073 |
| 1085 } // namespace ash | 1074 } // namespace ash |
| OLD | NEW |