OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/common/wm_root_window_controller.h" | 5 #include "ash/common/wm_root_window_controller.h" |
6 | 6 |
7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
8 #include "ash/common/shelf/shelf_layout_manager.h" | 8 #include "ash/common/shelf/shelf_layout_manager.h" |
9 #include "ash/common/shelf/shelf_widget.h" | 9 #include "ash/common/shelf/shelf_widget.h" |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 drag_drop_container->SetBoundsInScreenBehaviorForChildren( | 447 drag_drop_container->SetBoundsInScreenBehaviorForChildren( |
448 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); | 448 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); |
449 | 449 |
450 WmWindow* overlay_container = | 450 WmWindow* overlay_container = |
451 CreateContainer(kShellWindowId_OverlayContainer, "OverlayContainer", | 451 CreateContainer(kShellWindowId_OverlayContainer, "OverlayContainer", |
452 lock_screen_related_containers); | 452 lock_screen_related_containers); |
453 overlay_container->SetSnapsChildrenToPhysicalPixelBoundary(); | 453 overlay_container->SetSnapsChildrenToPhysicalPixelBoundary(); |
454 overlay_container->SetBoundsInScreenBehaviorForChildren( | 454 overlay_container->SetBoundsInScreenBehaviorForChildren( |
455 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); | 455 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); |
456 | 456 |
457 #if defined(OS_CHROMEOS) | |
458 WmWindow* mouse_cursor_container = CreateContainer( | 457 WmWindow* mouse_cursor_container = CreateContainer( |
459 kShellWindowId_MouseCursorContainer, "MouseCursorContainer", root_); | 458 kShellWindowId_MouseCursorContainer, "MouseCursorContainer", root_); |
460 mouse_cursor_container->SetBoundsInScreenBehaviorForChildren( | 459 mouse_cursor_container->SetBoundsInScreenBehaviorForChildren( |
461 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); | 460 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); |
462 #endif | |
463 | 461 |
464 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, | 462 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, |
465 "PowerButtonAnimationContainer", root_); | 463 "PowerButtonAnimationContainer", root_); |
466 } | 464 } |
467 | 465 |
468 void WmRootWindowController::CreateLayoutManagers() { | 466 void WmRootWindowController::CreateLayoutManagers() { |
469 GetShelf()->CreateShelfWidget(GetWindow()); | 467 GetShelf()->CreateShelfWidget(GetWindow()); |
470 | 468 |
471 root_window_layout_manager_ = new wm::RootWindowLayoutManager(root_); | 469 root_window_layout_manager_ = new wm::RootWindowLayoutManager(root_); |
472 root_->SetLayoutManager(base::WrapUnique(root_window_layout_manager_)); | 470 root_->SetLayoutManager(base::WrapUnique(root_window_layout_manager_)); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 } | 583 } |
586 | 584 |
587 void WmRootWindowController::OnMenuClosed() { | 585 void WmRootWindowController::OnMenuClosed() { |
588 menu_runner_.reset(); | 586 menu_runner_.reset(); |
589 menu_model_adapter_.reset(); | 587 menu_model_adapter_.reset(); |
590 menu_model_.reset(); | 588 menu_model_.reset(); |
591 GetShelf()->UpdateVisibilityState(); | 589 GetShelf()->UpdateVisibilityState(); |
592 } | 590 } |
593 | 591 |
594 } // namespace ash | 592 } // namespace ash |
OLD | NEW |