| 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 <queue> | 7 #include <queue> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 docked_layout_manager_ = | 815 docked_layout_manager_ = |
| 816 new DockedWindowLayoutManager(docked_container, workspace_controller()); | 816 new DockedWindowLayoutManager(docked_container, workspace_controller()); |
| 817 docked_container->SetLayoutManager(base::WrapUnique(docked_layout_manager_)); | 817 docked_container->SetLayoutManager(base::WrapUnique(docked_layout_manager_)); |
| 818 | 818 |
| 819 // Installs SnapLayoutManager to containers who set the | 819 // Installs SnapLayoutManager to containers who set the |
| 820 // |kSnapsChildrenToPhysicalPixelBoundary| property. | 820 // |kSnapsChildrenToPhysicalPixelBoundary| property. |
| 821 wm::InstallSnapLayoutManagerToContainers(root_window); | 821 wm::InstallSnapLayoutManagerToContainers(root_window); |
| 822 | 822 |
| 823 // Create Panel layout manager | 823 // Create Panel layout manager |
| 824 aura::Window* panel_container = GetContainer(kShellWindowId_PanelContainer); | 824 aura::Window* panel_container = GetContainer(kShellWindowId_PanelContainer); |
| 825 panel_layout_manager_ = new PanelLayoutManager(panel_container); | 825 wm::WmWindow* wm_panel_container = wm::WmWindowAura::Get(panel_container); |
| 826 panel_container->SetLayoutManager(panel_layout_manager_); | 826 panel_layout_manager_ = new PanelLayoutManager(wm_panel_container); |
| 827 wm_panel_container->SetLayoutManager(base::WrapUnique(panel_layout_manager_)); |
| 827 panel_container_handler_.reset(new PanelWindowEventHandler); | 828 panel_container_handler_.reset(new PanelWindowEventHandler); |
| 828 panel_container->AddPreTargetHandler(panel_container_handler_.get()); | 829 panel_container->AddPreTargetHandler(panel_container_handler_.get()); |
| 829 | 830 |
| 830 // Install an AttachedPanelWindowTargeter on the panel container to make it | 831 // Install an AttachedPanelWindowTargeter on the panel container to make it |
| 831 // easier to correctly target shelf buttons with touch. | 832 // easier to correctly target shelf buttons with touch. |
| 832 gfx::Insets mouse_extend(-kResizeOutsideBoundsSize, | 833 gfx::Insets mouse_extend(-kResizeOutsideBoundsSize, |
| 833 -kResizeOutsideBoundsSize, | 834 -kResizeOutsideBoundsSize, |
| 834 -kResizeOutsideBoundsSize, | 835 -kResizeOutsideBoundsSize, |
| 835 -kResizeOutsideBoundsSize); | 836 -kResizeOutsideBoundsSize); |
| 836 gfx::Insets touch_extend = mouse_extend.Scale( | 837 gfx::Insets touch_extend = mouse_extend.Scale( |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1086 else | 1087 else |
| 1087 DisableTouchHudProjection(); | 1088 DisableTouchHudProjection(); |
| 1088 } | 1089 } |
| 1089 | 1090 |
| 1090 RootWindowController* GetRootWindowController( | 1091 RootWindowController* GetRootWindowController( |
| 1091 const aura::Window* root_window) { | 1092 const aura::Window* root_window) { |
| 1092 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1093 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
| 1093 } | 1094 } |
| 1094 | 1095 |
| 1095 } // namespace ash | 1096 } // namespace ash |
| OLD | NEW |