| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/ash_touch_exploration_manager_chromeos.h" | 11 #include "ash/ash_touch_exploration_manager_chromeos.h" |
| 12 #include "ash/aura/aura_layout_manager_adapter.h" | 12 #include "ash/aura/aura_layout_manager_adapter.h" |
| 13 #include "ash/common/ash_constants.h" | 13 #include "ash/common/ash_constants.h" |
| 14 #include "ash/common/ash_switches.h" | 14 #include "ash/common/ash_switches.h" |
| 15 #include "ash/common/focus_cycler.h" | 15 #include "ash/common/focus_cycler.h" |
| 16 #include "ash/common/login_status.h" | 16 #include "ash/common/login_status.h" |
| 17 #include "ash/common/session/session_state_delegate.h" | 17 #include "ash/common/session/session_state_delegate.h" |
| 18 #include "ash/common/shelf/shelf_delegate.h" | 18 #include "ash/common/shelf/shelf_delegate.h" |
| 19 #include "ash/common/shelf/shelf_layout_manager.h" | 19 #include "ash/common/shelf/shelf_layout_manager.h" |
| 20 #include "ash/common/shelf/shelf_widget.h" | 20 #include "ash/common/shelf/shelf_widget.h" |
| 21 #include "ash/common/shelf/wm_shelf.h" | 21 #include "ash/common/shelf/wm_shelf.h" |
| 22 #include "ash/common/shell_delegate.h" | 22 #include "ash/common/shell_delegate.h" |
| 23 #include "ash/common/system/status_area_layout_manager.h" | 23 #include "ash/common/system/status_area_layout_manager.h" |
| 24 #include "ash/common/system/status_area_widget.h" | 24 #include "ash/common/system/status_area_widget.h" |
| 25 #include "ash/common/system/tray/system_tray_delegate.h" | 25 #include "ash/common/system/tray/system_tray_delegate.h" |
| 26 #include "ash/common/wallpaper/wallpaper_delegate.h" | 26 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| 27 #include "ash/common/wallpaper/wallpaper_widget_controller.h" | 27 #include "ash/common/wallpaper/wallpaper_widget_controller.h" |
| 28 #include "ash/common/wm/always_on_top_controller.h" | 28 #include "ash/common/wm/always_on_top_controller.h" |
| 29 #include "ash/common/wm/container_finder.h" | 29 #include "ash/common/wm/container_finder.h" |
| 30 #include "ash/common/wm/dock/docked_window_layout_manager.h" | |
| 31 #include "ash/common/wm/fullscreen_window_finder.h" | 30 #include "ash/common/wm/fullscreen_window_finder.h" |
| 32 #include "ash/common/wm/lock_layout_manager.h" | 31 #include "ash/common/wm/lock_layout_manager.h" |
| 33 #include "ash/common/wm/panels/panel_layout_manager.h" | 32 #include "ash/common/wm/panels/panel_layout_manager.h" |
| 34 #include "ash/common/wm/root_window_layout_manager.h" | 33 #include "ash/common/wm/root_window_layout_manager.h" |
| 35 #include "ash/common/wm/switchable_windows.h" | 34 #include "ash/common/wm/switchable_windows.h" |
| 36 #include "ash/common/wm/system_modal_container_layout_manager.h" | 35 #include "ash/common/wm/system_modal_container_layout_manager.h" |
| 37 #include "ash/common/wm/window_state.h" | 36 #include "ash/common/wm/window_state.h" |
| 38 #include "ash/common/wm/workspace/workspace_layout_manager.h" | 37 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
| 39 #include "ash/common/wm/workspace_controller.h" | 38 #include "ash/common/wm/workspace_controller.h" |
| 40 #include "ash/common/wm_shell.h" | 39 #include "ash/common/wm_shell.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // Reparents |window| to |new_parent|. | 164 // Reparents |window| to |new_parent|. |
| 166 // TODO(sky): This should take an aura::Window. http://crbug.com/671246. | 165 // TODO(sky): This should take an aura::Window. http://crbug.com/671246. |
| 167 void ReparentWindow(WmWindow* window, WmWindow* new_parent) { | 166 void ReparentWindow(WmWindow* window, WmWindow* new_parent) { |
| 168 const gfx::Size src_size = window->GetParent()->GetBounds().size(); | 167 const gfx::Size src_size = window->GetParent()->GetBounds().size(); |
| 169 const gfx::Size dst_size = new_parent->GetBounds().size(); | 168 const gfx::Size dst_size = new_parent->GetBounds().size(); |
| 170 // Update the restore bounds to make it relative to the display. | 169 // Update the restore bounds to make it relative to the display. |
| 171 wm::WindowState* state = window->GetWindowState(); | 170 wm::WindowState* state = window->GetWindowState(); |
| 172 gfx::Rect restore_bounds; | 171 gfx::Rect restore_bounds; |
| 173 bool has_restore_bounds = state->HasRestoreBounds(); | 172 bool has_restore_bounds = state->HasRestoreBounds(); |
| 174 | 173 |
| 175 bool update_bounds = | 174 bool update_bounds = state->IsNormalOrSnapped() || state->IsMinimized(); |
| 176 (state->IsNormalOrSnapped() || state->IsMinimized()) && | |
| 177 new_parent->GetShellWindowId() != kShellWindowId_DockedContainer; | |
| 178 gfx::Rect local_bounds; | 175 gfx::Rect local_bounds; |
| 179 if (update_bounds) { | 176 if (update_bounds) { |
| 180 local_bounds = state->window()->GetBounds(); | 177 local_bounds = state->window()->GetBounds(); |
| 181 MoveOriginRelativeToSize(src_size, dst_size, &local_bounds); | 178 MoveOriginRelativeToSize(src_size, dst_size, &local_bounds); |
| 182 } | 179 } |
| 183 | 180 |
| 184 if (has_restore_bounds) { | 181 if (has_restore_bounds) { |
| 185 restore_bounds = state->GetRestoreBoundsInParent(); | 182 restore_bounds = state->GetRestoreBoundsInParent(); |
| 186 MoveOriginRelativeToSize(src_size, dst_size, &restore_bounds); | 183 MoveOriginRelativeToSize(src_size, dst_size, &restore_bounds); |
| 187 } | 184 } |
| 188 | 185 |
| 189 new_parent->AddChild(window); | 186 new_parent->AddChild(window); |
| 190 | 187 |
| 191 // Docked windows have bounds handled by the layout manager in AddChild(). | 188 // Docked windows have bounds handled by the layout manager in AddChild(). |
| 192 if (update_bounds) | 189 if (update_bounds) |
| 193 window->SetBounds(local_bounds); | 190 window->SetBounds(local_bounds); |
| 194 | 191 |
| 195 if (has_restore_bounds) | 192 if (has_restore_bounds) |
| 196 state->SetRestoreBoundsInParent(restore_bounds); | 193 state->SetRestoreBoundsInParent(restore_bounds); |
| 197 } | 194 } |
| 198 | 195 |
| 199 // Reparents the appropriate set of windows from |src| to |dst|. | 196 // Reparents the appropriate set of windows from |src| to |dst|. |
| 200 // TODO(sky): This should take an aura::Window. http://crbug.com/671246. | 197 // TODO(sky): This should take an aura::Window. http://crbug.com/671246. |
| 201 void ReparentAllWindows(WmWindow* src, WmWindow* dst) { | 198 void ReparentAllWindows(WmWindow* src, WmWindow* dst) { |
| 202 // Set of windows to move. | 199 // Set of windows to move. |
| 203 const int kContainerIdsToMove[] = { | 200 const int kContainerIdsToMove[] = { |
| 204 kShellWindowId_DefaultContainer, | 201 kShellWindowId_DefaultContainer, |
| 205 kShellWindowId_DockedContainer, | |
| 206 kShellWindowId_PanelContainer, | 202 kShellWindowId_PanelContainer, |
| 207 kShellWindowId_AlwaysOnTopContainer, | 203 kShellWindowId_AlwaysOnTopContainer, |
| 208 kShellWindowId_SystemModalContainer, | 204 kShellWindowId_SystemModalContainer, |
| 209 kShellWindowId_LockSystemModalContainer, | 205 kShellWindowId_LockSystemModalContainer, |
| 210 kShellWindowId_UnparentedControlContainer, | 206 kShellWindowId_UnparentedControlContainer, |
| 211 kShellWindowId_OverlayContainer, | 207 kShellWindowId_OverlayContainer, |
| 212 }; | 208 }; |
| 213 const int kExtraContainerIdsToMoveInUnifiedMode[] = { | 209 const int kExtraContainerIdsToMoveInUnifiedMode[] = { |
| 214 kShellWindowId_LockScreenContainer, | 210 kShellWindowId_LockScreenContainer, |
| 215 kShellWindowId_LockScreenWallpaperContainer, | 211 kShellWindowId_LockScreenWallpaperContainer, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 359 |
| 364 void RootWindowController::CreateShelfView() { | 360 void RootWindowController::CreateShelfView() { |
| 365 if (wm_shelf_->IsShelfInitialized()) | 361 if (wm_shelf_->IsShelfInitialized()) |
| 366 return; | 362 return; |
| 367 wm_shelf_->CreateShelfView(); | 363 wm_shelf_->CreateShelfView(); |
| 368 | 364 |
| 369 // TODO(jamescook): Pass |wm_shelf_| into the constructors for these layout | 365 // TODO(jamescook): Pass |wm_shelf_| into the constructors for these layout |
| 370 // managers. | 366 // managers. |
| 371 if (panel_layout_manager_) | 367 if (panel_layout_manager_) |
| 372 panel_layout_manager_->SetShelf(wm_shelf_.get()); | 368 panel_layout_manager_->SetShelf(wm_shelf_.get()); |
| 373 if (docked_window_layout_manager_) { | |
| 374 docked_window_layout_manager_->SetShelf(wm_shelf_.get()); | |
| 375 if (wm_shelf_->shelf_layout_manager()) | |
| 376 docked_window_layout_manager_->AddObserver( | |
| 377 wm_shelf_->shelf_layout_manager()); | |
| 378 } | |
| 379 | 369 |
| 380 // Notify shell observers that the shelf has been created. | 370 // Notify shell observers that the shelf has been created. |
| 381 // TODO(jamescook): Move this into WmShelf::InitializeShelf(). This will | 371 // TODO(jamescook): Move this into WmShelf::InitializeShelf(). This will |
| 382 // require changing AttachedPanelWidgetTargeter's access to WmShelf. | 372 // require changing AttachedPanelWidgetTargeter's access to WmShelf. |
| 383 WmShell::Get()->NotifyShelfCreatedForRootWindow( | 373 WmShell::Get()->NotifyShelfCreatedForRootWindow( |
| 384 WmWindow::Get(GetRootWindow())); | 374 WmWindow::Get(GetRootWindow())); |
| 385 | 375 |
| 386 wm_shelf_->shelf_widget()->PostCreateShelf(); | 376 wm_shelf_->shelf_widget()->PostCreateShelf(); |
| 387 } | 377 } |
| 388 | 378 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 if (ash_host_) | 549 if (ash_host_) |
| 560 ash_host_->PrepareForShutdown(); | 550 ash_host_->PrepareForShutdown(); |
| 561 | 551 |
| 562 system_wallpaper_.reset(); | 552 system_wallpaper_.reset(); |
| 563 aura::client::SetScreenPositionClient(root_window, nullptr); | 553 aura::client::SetScreenPositionClient(root_window, nullptr); |
| 564 } | 554 } |
| 565 | 555 |
| 566 void RootWindowController::CloseChildWindows() { | 556 void RootWindowController::CloseChildWindows() { |
| 567 // NOTE: this may be called multiple times. | 557 // NOTE: this may be called multiple times. |
| 568 | 558 |
| 569 // Remove observer as deactivating keyboard causes | |
| 570 // docked_window_layout_manager() to fire notifications. | |
| 571 if (docked_window_layout_manager() && wm_shelf_->shelf_layout_manager()) { | |
| 572 docked_window_layout_manager()->RemoveObserver( | |
| 573 wm_shelf_->shelf_layout_manager()); | |
| 574 } | |
| 575 | |
| 576 // Deactivate keyboard container before closing child windows and shutting | 559 // Deactivate keyboard container before closing child windows and shutting |
| 577 // down associated layout managers. | 560 // down associated layout managers. |
| 578 DeactivateKeyboard(keyboard::KeyboardController::GetInstance()); | 561 DeactivateKeyboard(keyboard::KeyboardController::GetInstance()); |
| 579 | 562 |
| 580 // |panel_layout_manager_| needs to be shut down before windows are destroyed. | 563 // |panel_layout_manager_| needs to be shut down before windows are destroyed. |
| 581 if (panel_layout_manager_) { | 564 if (panel_layout_manager_) { |
| 582 panel_layout_manager_->Shutdown(); | 565 panel_layout_manager_->Shutdown(); |
| 583 panel_layout_manager_ = nullptr; | 566 panel_layout_manager_ = nullptr; |
| 584 } | 567 } |
| 585 | 568 |
| 586 // |docked_window_layout_manager_| needs to be shut down before windows are | |
| 587 // destroyed. | |
| 588 if (docked_window_layout_manager_) { | |
| 589 docked_window_layout_manager_->Shutdown(); | |
| 590 docked_window_layout_manager_ = nullptr; | |
| 591 } | |
| 592 | |
| 593 WmShelf* shelf = GetShelf(); | 569 WmShelf* shelf = GetShelf(); |
| 594 shelf->ShutdownShelfWidget(); | 570 shelf->ShutdownShelfWidget(); |
| 595 | 571 |
| 596 workspace_controller_.reset(); | 572 workspace_controller_.reset(); |
| 597 | 573 |
| 598 // Explicitly destroy top level windows. We do this because such windows may | 574 // Explicitly destroy top level windows. We do this because such windows may |
| 599 // query the RootWindow for state. | 575 // query the RootWindow for state. |
| 600 aura::WindowTracker non_toplevel_windows; | 576 aura::WindowTracker non_toplevel_windows; |
| 601 WmWindow* root = GetWindow(); | 577 WmWindow* root = GetWindow(); |
| 602 non_toplevel_windows.Add(root->aura_window()); | 578 non_toplevel_windows.Add(root->aura_window()); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 | 638 |
| 663 void RootWindowController::ActivateKeyboard( | 639 void RootWindowController::ActivateKeyboard( |
| 664 keyboard::KeyboardController* keyboard_controller) { | 640 keyboard::KeyboardController* keyboard_controller) { |
| 665 if (!keyboard::IsKeyboardEnabled() || | 641 if (!keyboard::IsKeyboardEnabled() || |
| 666 GetContainer(kShellWindowId_VirtualKeyboardContainer)) { | 642 GetContainer(kShellWindowId_VirtualKeyboardContainer)) { |
| 667 return; | 643 return; |
| 668 } | 644 } |
| 669 DCHECK(keyboard_controller); | 645 DCHECK(keyboard_controller); |
| 670 keyboard_controller->AddObserver(wm_shelf_->shelf_layout_manager()); | 646 keyboard_controller->AddObserver(wm_shelf_->shelf_layout_manager()); |
| 671 keyboard_controller->AddObserver(panel_layout_manager()); | 647 keyboard_controller->AddObserver(panel_layout_manager()); |
| 672 keyboard_controller->AddObserver(docked_window_layout_manager()); | |
| 673 keyboard_controller->AddObserver(workspace_controller()->layout_manager()); | 648 keyboard_controller->AddObserver(workspace_controller()->layout_manager()); |
| 674 keyboard_controller->AddObserver( | 649 keyboard_controller->AddObserver( |
| 675 always_on_top_controller_->GetLayoutManager()); | 650 always_on_top_controller_->GetLayoutManager()); |
| 676 WmShell::Get()->NotifyVirtualKeyboardActivated(true); | 651 WmShell::Get()->NotifyVirtualKeyboardActivated(true); |
| 677 aura::Window* parent = GetContainer(kShellWindowId_ImeWindowParentContainer); | 652 aura::Window* parent = GetContainer(kShellWindowId_ImeWindowParentContainer); |
| 678 DCHECK(parent); | 653 DCHECK(parent); |
| 679 aura::Window* keyboard_container = keyboard_controller->GetContainerWindow(); | 654 aura::Window* keyboard_container = keyboard_controller->GetContainerWindow(); |
| 680 keyboard_container->set_id(kShellWindowId_VirtualKeyboardContainer); | 655 keyboard_container->set_id(kShellWindowId_VirtualKeyboardContainer); |
| 681 parent->AddChild(keyboard_container); | 656 parent->AddChild(keyboard_container); |
| 682 } | 657 } |
| 683 | 658 |
| 684 void RootWindowController::DeactivateKeyboard( | 659 void RootWindowController::DeactivateKeyboard( |
| 685 keyboard::KeyboardController* keyboard_controller) { | 660 keyboard::KeyboardController* keyboard_controller) { |
| 686 if (!keyboard_controller || | 661 if (!keyboard_controller || |
| 687 !keyboard_controller->keyboard_container_initialized()) { | 662 !keyboard_controller->keyboard_container_initialized()) { |
| 688 return; | 663 return; |
| 689 } | 664 } |
| 690 aura::Window* keyboard_container = keyboard_controller->GetContainerWindow(); | 665 aura::Window* keyboard_container = keyboard_controller->GetContainerWindow(); |
| 691 if (keyboard_container->GetRootWindow() == GetRootWindow()) { | 666 if (keyboard_container->GetRootWindow() == GetRootWindow()) { |
| 692 aura::Window* parent = | 667 aura::Window* parent = |
| 693 GetContainer(kShellWindowId_ImeWindowParentContainer); | 668 GetContainer(kShellWindowId_ImeWindowParentContainer); |
| 694 DCHECK(parent); | 669 DCHECK(parent); |
| 695 // Virtual keyboard may be deactivated while still showing, hide the | 670 // Virtual keyboard may be deactivated while still showing, hide the |
| 696 // keyboard before removing it from view hierarchy. | 671 // keyboard before removing it from view hierarchy. |
| 697 keyboard_controller->HideKeyboard( | 672 keyboard_controller->HideKeyboard( |
| 698 keyboard::KeyboardController::HIDE_REASON_AUTOMATIC); | 673 keyboard::KeyboardController::HIDE_REASON_AUTOMATIC); |
| 699 parent->RemoveChild(keyboard_container); | 674 parent->RemoveChild(keyboard_container); |
| 700 keyboard_controller->RemoveObserver(wm_shelf_->shelf_layout_manager()); | 675 keyboard_controller->RemoveObserver(wm_shelf_->shelf_layout_manager()); |
| 701 keyboard_controller->RemoveObserver(panel_layout_manager()); | 676 keyboard_controller->RemoveObserver(panel_layout_manager()); |
| 702 keyboard_controller->RemoveObserver(docked_window_layout_manager()); | |
| 703 keyboard_controller->RemoveObserver( | 677 keyboard_controller->RemoveObserver( |
| 704 workspace_controller()->layout_manager()); | 678 workspace_controller()->layout_manager()); |
| 705 keyboard_controller->RemoveObserver( | 679 keyboard_controller->RemoveObserver( |
| 706 always_on_top_controller_->GetLayoutManager()); | 680 always_on_top_controller_->GetLayoutManager()); |
| 707 WmShell::Get()->NotifyVirtualKeyboardActivated(false); | 681 WmShell::Get()->NotifyVirtualKeyboardActivated(false); |
| 708 } | 682 } |
| 709 } | 683 } |
| 710 | 684 |
| 711 bool RootWindowController::IsVirtualKeyboardWindow(aura::Window* window) { | 685 bool RootWindowController::IsVirtualKeyboardWindow(aura::Window* window) { |
| 712 aura::Window* parent = GetContainer(kShellWindowId_ImeWindowParentContainer); | 686 aura::Window* parent = GetContainer(kShellWindowId_ImeWindowParentContainer); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 DCHECK(lock_container); | 827 DCHECK(lock_container); |
| 854 lock_container->SetLayoutManager( | 828 lock_container->SetLayoutManager( |
| 855 base::MakeUnique<LockLayoutManager>(lock_container)); | 829 base::MakeUnique<LockLayoutManager>(lock_container)); |
| 856 | 830 |
| 857 WmWindow* always_on_top_container = | 831 WmWindow* always_on_top_container = |
| 858 GetWmContainer(kShellWindowId_AlwaysOnTopContainer); | 832 GetWmContainer(kShellWindowId_AlwaysOnTopContainer); |
| 859 DCHECK(always_on_top_container); | 833 DCHECK(always_on_top_container); |
| 860 always_on_top_controller_ = | 834 always_on_top_controller_ = |
| 861 base::MakeUnique<AlwaysOnTopController>(always_on_top_container); | 835 base::MakeUnique<AlwaysOnTopController>(always_on_top_container); |
| 862 | 836 |
| 863 // Create Docked windows layout manager | |
| 864 WmWindow* docked_container = GetWmContainer(kShellWindowId_DockedContainer); | |
| 865 docked_window_layout_manager_ = | |
| 866 new DockedWindowLayoutManager(docked_container); | |
| 867 docked_container->SetLayoutManager( | |
| 868 base::WrapUnique(docked_window_layout_manager_)); | |
| 869 | |
| 870 // Create Panel layout manager | 837 // Create Panel layout manager |
| 871 WmWindow* wm_panel_container = GetWmContainer(kShellWindowId_PanelContainer); | 838 WmWindow* wm_panel_container = GetWmContainer(kShellWindowId_PanelContainer); |
| 872 panel_layout_manager_ = new PanelLayoutManager(wm_panel_container); | 839 panel_layout_manager_ = new PanelLayoutManager(wm_panel_container); |
| 873 wm_panel_container->SetLayoutManager(base::WrapUnique(panel_layout_manager_)); | 840 wm_panel_container->SetLayoutManager(base::WrapUnique(panel_layout_manager_)); |
| 874 | 841 |
| 875 wm::WmSnapToPixelLayoutManager::InstallOnContainers(root); | 842 wm::WmSnapToPixelLayoutManager::InstallOnContainers(root); |
| 876 | 843 |
| 877 // Make it easier to resize windows that partially overlap the shelf. Must | 844 // Make it easier to resize windows that partially overlap the shelf. Must |
| 878 // occur after the ShelfLayoutManager is constructed by ShelfWidget. | 845 // occur after the ShelfLayoutManager is constructed by ShelfWidget. |
| 879 aura::Window* shelf_container = GetContainer(kShellWindowId_ShelfContainer); | 846 aura::Window* shelf_container = GetContainer(kShellWindowId_ShelfContainer); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 default_container->SetChildrenUseExtendedHitRegion(); | 916 default_container->SetChildrenUseExtendedHitRegion(); |
| 950 | 917 |
| 951 WmWindow* always_on_top_container = | 918 WmWindow* always_on_top_container = |
| 952 CreateContainer(kShellWindowId_AlwaysOnTopContainer, | 919 CreateContainer(kShellWindowId_AlwaysOnTopContainer, |
| 953 "AlwaysOnTopContainer", non_lock_screen_containers); | 920 "AlwaysOnTopContainer", non_lock_screen_containers); |
| 954 always_on_top_container->SetChildWindowVisibilityChangesAnimated(); | 921 always_on_top_container->SetChildWindowVisibilityChangesAnimated(); |
| 955 always_on_top_container->SetSnapsChildrenToPhysicalPixelBoundary(); | 922 always_on_top_container->SetSnapsChildrenToPhysicalPixelBoundary(); |
| 956 always_on_top_container->SetBoundsInScreenBehaviorForChildren( | 923 always_on_top_container->SetBoundsInScreenBehaviorForChildren( |
| 957 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); | 924 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); |
| 958 | 925 |
| 959 WmWindow* docked_container = | |
| 960 CreateContainer(kShellWindowId_DockedContainer, "DockedContainer", | |
| 961 non_lock_screen_containers); | |
| 962 docked_container->SetChildWindowVisibilityChangesAnimated(); | |
| 963 docked_container->SetSnapsChildrenToPhysicalPixelBoundary(); | |
| 964 docked_container->SetBoundsInScreenBehaviorForChildren( | |
| 965 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); | |
| 966 docked_container->SetChildrenUseExtendedHitRegion(); | |
| 967 | |
| 968 WmWindow* shelf_container = | 926 WmWindow* shelf_container = |
| 969 CreateContainer(kShellWindowId_ShelfContainer, "ShelfContainer", | 927 CreateContainer(kShellWindowId_ShelfContainer, "ShelfContainer", |
| 970 non_lock_screen_containers); | 928 non_lock_screen_containers); |
| 971 shelf_container->SetSnapsChildrenToPhysicalPixelBoundary(); | 929 shelf_container->SetSnapsChildrenToPhysicalPixelBoundary(); |
| 972 shelf_container->SetBoundsInScreenBehaviorForChildren( | 930 shelf_container->SetBoundsInScreenBehaviorForChildren( |
| 973 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); | 931 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); |
| 974 shelf_container->SetLockedToRoot(true); | 932 shelf_container->SetLockedToRoot(true); |
| 975 | 933 |
| 976 WmWindow* panel_container = | 934 WmWindow* panel_container = |
| 977 CreateContainer(kShellWindowId_PanelContainer, "PanelContainer", | 935 CreateContainer(kShellWindowId_PanelContainer, "PanelContainer", |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 EnableTouchHudProjection(); | 1106 EnableTouchHudProjection(); |
| 1149 else | 1107 else |
| 1150 DisableTouchHudProjection(); | 1108 DisableTouchHudProjection(); |
| 1151 } | 1109 } |
| 1152 | 1110 |
| 1153 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1111 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
| 1154 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1112 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
| 1155 } | 1113 } |
| 1156 | 1114 |
| 1157 } // namespace ash | 1115 } // namespace ash |
| OLD | NEW |