Chromium Code Reviews| Index: ash/root_window_controller.cc |
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
| index 60018d5be523d3ee766cbe4da0e3264325008969..1a9a50c75e90465daaf8238b4261867c87f9d3f3 100644 |
| --- a/ash/root_window_controller.cc |
| +++ b/ash/root_window_controller.cc |
| @@ -856,6 +856,10 @@ void RootWindowController::InitLayoutManagers() { |
| new DockedWindowLayoutManager(docked_container, workspace_controller()); |
| docked_container->SetLayoutManager(docked_layout_manager_); |
| + // Installs SnapLayoutManager to containers who set the |
| + // |kSnapsChildrenToPhysicalPixelBoundary| property. |
| + wm::InstallSnapLayoutManagerToContainers(root_window); |
| + |
|
Jun Mukai
2014/07/16 22:59:08
Not sure why this is necessary. Instead of settin
oshima
2014/07/17 22:07:56
Because some containers may install its own layout
Jun Mukai
2014/07/17 22:26:31
Hmm, I don't get the point.
If a container with t
Jun Mukai
2014/07/17 22:27:16
ah, your new patchset is in this way. Thanks for q
oshima
2014/07/17 22:28:40
Sorry, I should have mentioned that.
|
| // Create Panel layout manager |
| aura::Window* panel_container = GetContainer(kShellWindowId_PanelContainer); |
| panel_layout_manager_ = new PanelLayoutManager(panel_container); |
| @@ -984,12 +988,14 @@ void RootWindowController::CreateContainersInRootWindow( |
| kShellWindowId_PanelContainer, |
| "PanelContainer", |
| non_lock_screen_containers); |
| + wm::SetSnapsChildrenToPhysicalPixelBoundary(panel_container); |
| SetUsesScreenCoordinates(panel_container); |
| aura::Window* shelf_bubble_container = |
| CreateContainer(kShellWindowId_ShelfBubbleContainer, |
| "ShelfBubbleContainer", |
| non_lock_screen_containers); |
| + wm::SetSnapsChildrenToPhysicalPixelBoundary(shelf_bubble_container); |
| SetUsesScreenCoordinates(shelf_bubble_container); |
| DescendantShouldStayInSameRootWindow(shelf_bubble_container); |
| @@ -997,6 +1003,7 @@ void RootWindowController::CreateContainersInRootWindow( |
| CreateContainer(kShellWindowId_AppListContainer, |
| "AppListContainer", |
| non_lock_screen_containers); |
| + wm::SetSnapsChildrenToPhysicalPixelBoundary(app_list_container); |
| SetUsesScreenCoordinates(app_list_container); |
| aura::Window* modal_container = CreateContainer( |
| @@ -1047,6 +1054,7 @@ void RootWindowController::CreateContainersInRootWindow( |
| "SettingBubbleContainer", |
| lock_screen_related_containers); |
| ::wm::SetChildWindowVisibilityChangesAnimated(settings_bubble_container); |
| + wm::SetSnapsChildrenToPhysicalPixelBoundary(settings_bubble_container); |
| SetUsesScreenCoordinates(settings_bubble_container); |
| DescendantShouldStayInSameRootWindow(settings_bubble_container); |
| @@ -1055,6 +1063,7 @@ void RootWindowController::CreateContainersInRootWindow( |
| "MenuContainer", |
| lock_screen_related_containers); |
| ::wm::SetChildWindowVisibilityChangesAnimated(menu_container); |
| + wm::SetSnapsChildrenToPhysicalPixelBoundary(menu_container); |
| SetUsesScreenCoordinates(menu_container); |
| aura::Window* drag_drop_container = CreateContainer( |
| @@ -1062,18 +1071,22 @@ void RootWindowController::CreateContainersInRootWindow( |
| "DragImageAndTooltipContainer", |
| lock_screen_related_containers); |
| ::wm::SetChildWindowVisibilityChangesAnimated(drag_drop_container); |
| + wm::SetSnapsChildrenToPhysicalPixelBoundary(drag_drop_container); |
| SetUsesScreenCoordinates(drag_drop_container); |
| aura::Window* overlay_container = CreateContainer( |
| kShellWindowId_OverlayContainer, |
| "OverlayContainer", |
| lock_screen_related_containers); |
| + wm::SetSnapsChildrenToPhysicalPixelBoundary(overlay_container); |
| SetUsesScreenCoordinates(overlay_container); |
| aura::Window* virtual_keyboard_parent_container = CreateContainer( |
| kShellWindowId_VirtualKeyboardParentContainer, |
| "VirtualKeyboardParentContainer", |
| root_window); |
| + wm::SetSnapsChildrenToPhysicalPixelBoundary( |
| + virtual_keyboard_parent_container); |
| SetUsesScreenCoordinates(virtual_keyboard_parent_container); |
| #if defined(OS_CHROMEOS) |