| 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/desktop_background/desktop_background_widget_controller.h" | 9 #include "ash/desktop_background/desktop_background_widget_controller.h" |
| 10 #include "ash/display/display_controller.h" | 10 #include "ash/display/display_controller.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 "UnparentedControlContainer", | 288 "UnparentedControlContainer", |
| 289 non_lock_screen_containers); | 289 non_lock_screen_containers); |
| 290 | 290 |
| 291 aura::Window* default_container = CreateContainer( | 291 aura::Window* default_container = CreateContainer( |
| 292 internal::kShellWindowId_DefaultContainer, | 292 internal::kShellWindowId_DefaultContainer, |
| 293 "DefaultContainer", | 293 "DefaultContainer", |
| 294 non_lock_screen_containers); | 294 non_lock_screen_containers); |
| 295 if (!internal::WorkspaceController::IsWorkspace2Enabled()) { | 295 if (!internal::WorkspaceController::IsWorkspace2Enabled()) { |
| 296 default_container_handler_.reset( | 296 default_container_handler_.reset( |
| 297 new ToplevelWindowEventHandler(default_container)); | 297 new ToplevelWindowEventHandler(default_container)); |
| 298 default_container->AddPreTargetHandler(default_container_handler_.get()); | |
| 299 } | 298 } |
| 300 SetChildWindowVisibilityChangesAnimated(default_container); | 299 SetChildWindowVisibilityChangesAnimated(default_container); |
| 301 SetUsesScreenCoordinates(default_container); | 300 SetUsesScreenCoordinates(default_container); |
| 302 | 301 |
| 303 aura::Window* always_on_top_container = CreateContainer( | 302 aura::Window* always_on_top_container = CreateContainer( |
| 304 internal::kShellWindowId_AlwaysOnTopContainer, | 303 internal::kShellWindowId_AlwaysOnTopContainer, |
| 305 "AlwaysOnTopContainer", | 304 "AlwaysOnTopContainer", |
| 306 non_lock_screen_containers); | 305 non_lock_screen_containers); |
| 307 always_on_top_container_handler_.reset( | 306 always_on_top_container_handler_.reset( |
| 308 new ToplevelWindowEventHandler(always_on_top_container)); | 307 new ToplevelWindowEventHandler(always_on_top_container)); |
| 309 always_on_top_container->AddPreTargetHandler( | |
| 310 always_on_top_container_handler_.get()); | |
| 311 SetChildWindowVisibilityChangesAnimated(always_on_top_container); | 308 SetChildWindowVisibilityChangesAnimated(always_on_top_container); |
| 312 SetUsesScreenCoordinates(always_on_top_container); | 309 SetUsesScreenCoordinates(always_on_top_container); |
| 313 | 310 |
| 314 aura::Window* panel_container = CreateContainer( | 311 aura::Window* panel_container = CreateContainer( |
| 315 internal::kShellWindowId_PanelContainer, | 312 internal::kShellWindowId_PanelContainer, |
| 316 "PanelContainer", | 313 "PanelContainer", |
| 317 non_lock_screen_containers); | 314 non_lock_screen_containers); |
| 318 SetUsesScreenCoordinates(panel_container); | 315 SetUsesScreenCoordinates(panel_container); |
| 319 | 316 |
| 320 aura::Window* launcher_container = | 317 aura::Window* launcher_container = |
| 321 CreateContainer(internal::kShellWindowId_LauncherContainer, | 318 CreateContainer(internal::kShellWindowId_LauncherContainer, |
| 322 "LauncherContainer", | 319 "LauncherContainer", |
| 323 non_lock_screen_containers); | 320 non_lock_screen_containers); |
| 324 SetUsesScreenCoordinates(launcher_container); | 321 SetUsesScreenCoordinates(launcher_container); |
| 325 | 322 |
| 326 CreateContainer(internal::kShellWindowId_AppListContainer, | 323 CreateContainer(internal::kShellWindowId_AppListContainer, |
| 327 "AppListContainer", | 324 "AppListContainer", |
| 328 non_lock_screen_containers); | 325 non_lock_screen_containers); |
| 329 | 326 |
| 330 aura::Window* modal_container = CreateContainer( | 327 aura::Window* modal_container = CreateContainer( |
| 331 internal::kShellWindowId_SystemModalContainer, | 328 internal::kShellWindowId_SystemModalContainer, |
| 332 "SystemModalContainer", | 329 "SystemModalContainer", |
| 333 non_lock_screen_containers); | 330 non_lock_screen_containers); |
| 334 modal_container_handler_.reset( | 331 modal_container_handler_.reset( |
| 335 new ToplevelWindowEventHandler(modal_container)); | 332 new ToplevelWindowEventHandler(modal_container)); |
| 336 modal_container->AddPreTargetHandler(modal_container_handler_.get()); | |
| 337 modal_container->SetLayoutManager( | 333 modal_container->SetLayoutManager( |
| 338 new internal::SystemModalContainerLayoutManager(modal_container)); | 334 new internal::SystemModalContainerLayoutManager(modal_container)); |
| 339 SetChildWindowVisibilityChangesAnimated(modal_container); | 335 SetChildWindowVisibilityChangesAnimated(modal_container); |
| 340 SetUsesScreenCoordinates(modal_container); | 336 SetUsesScreenCoordinates(modal_container); |
| 341 | 337 |
| 342 aura::Window* input_method_container = CreateContainer( | 338 aura::Window* input_method_container = CreateContainer( |
| 343 internal::kShellWindowId_InputMethodContainer, | 339 internal::kShellWindowId_InputMethodContainer, |
| 344 "InputMethodContainer", | 340 "InputMethodContainer", |
| 345 non_lock_screen_containers); | 341 non_lock_screen_containers); |
| 346 SetUsesScreenCoordinates(input_method_container); | 342 SetUsesScreenCoordinates(input_method_container); |
| 347 | 343 |
| 348 // TODO(beng): Figure out if we can make this use | 344 // TODO(beng): Figure out if we can make this use |
| 349 // SystemModalContainerEventFilter instead of stops_event_propagation. | 345 // SystemModalContainerEventFilter instead of stops_event_propagation. |
| 350 aura::Window* lock_container = CreateContainer( | 346 aura::Window* lock_container = CreateContainer( |
| 351 internal::kShellWindowId_LockScreenContainer, | 347 internal::kShellWindowId_LockScreenContainer, |
| 352 "LockScreenContainer", | 348 "LockScreenContainer", |
| 353 lock_screen_containers); | 349 lock_screen_containers); |
| 354 lock_container->SetLayoutManager( | 350 lock_container->SetLayoutManager( |
| 355 new internal::BaseLayoutManager(root_window)); | 351 new internal::BaseLayoutManager(root_window)); |
| 356 SetUsesScreenCoordinates(lock_container); | 352 SetUsesScreenCoordinates(lock_container); |
| 357 // TODO(beng): stopsevents | 353 // TODO(beng): stopsevents |
| 358 | 354 |
| 359 aura::Window* lock_modal_container = CreateContainer( | 355 aura::Window* lock_modal_container = CreateContainer( |
| 360 internal::kShellWindowId_LockSystemModalContainer, | 356 internal::kShellWindowId_LockSystemModalContainer, |
| 361 "LockSystemModalContainer", | 357 "LockSystemModalContainer", |
| 362 lock_screen_containers); | 358 lock_screen_containers); |
| 363 lock_modal_container_handler_.reset( | 359 lock_modal_container_handler_.reset( |
| 364 new ToplevelWindowEventHandler(lock_modal_container)); | 360 new ToplevelWindowEventHandler(lock_modal_container)); |
| 365 lock_modal_container->AddPreTargetHandler( | |
| 366 lock_modal_container_handler_.get()); | |
| 367 lock_modal_container->SetLayoutManager( | 361 lock_modal_container->SetLayoutManager( |
| 368 new internal::SystemModalContainerLayoutManager(lock_modal_container)); | 362 new internal::SystemModalContainerLayoutManager(lock_modal_container)); |
| 369 SetChildWindowVisibilityChangesAnimated(lock_modal_container); | 363 SetChildWindowVisibilityChangesAnimated(lock_modal_container); |
| 370 SetUsesScreenCoordinates(lock_modal_container); | 364 SetUsesScreenCoordinates(lock_modal_container); |
| 371 | 365 |
| 372 aura::Window* status_container = | 366 aura::Window* status_container = |
| 373 CreateContainer(internal::kShellWindowId_StatusContainer, | 367 CreateContainer(internal::kShellWindowId_StatusContainer, |
| 374 "StatusContainer", | 368 "StatusContainer", |
| 375 lock_screen_related_containers); | 369 lock_screen_related_containers); |
| 376 SetUsesScreenCoordinates(status_container); | 370 SetUsesScreenCoordinates(status_container); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 398 | 392 |
| 399 aura::Window* overlay_container = CreateContainer( | 393 aura::Window* overlay_container = CreateContainer( |
| 400 internal::kShellWindowId_OverlayContainer, | 394 internal::kShellWindowId_OverlayContainer, |
| 401 "OverlayContainer", | 395 "OverlayContainer", |
| 402 lock_screen_related_containers); | 396 lock_screen_related_containers); |
| 403 SetUsesScreenCoordinates(overlay_container); | 397 SetUsesScreenCoordinates(overlay_container); |
| 404 } | 398 } |
| 405 | 399 |
| 406 } // namespace internal | 400 } // namespace internal |
| 407 } // namespace ash | 401 } // namespace ash |
| OLD | NEW |