Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: ash/root_window_controller.cc

Issue 2746873003: Refactor PanelLayoutManager to use aura::LayoutManager (Closed)
Patch Set: minor Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/wm/wm_snap_to_pixel_layout_manager.cc ('k') | ash/test/wm_window_test_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 // Create Docked windows layout manager 858 // Create Docked windows layout manager
859 WmWindow* docked_container = GetWmContainer(kShellWindowId_DockedContainer); 859 WmWindow* docked_container = GetWmContainer(kShellWindowId_DockedContainer);
860 docked_window_layout_manager_ = 860 docked_window_layout_manager_ =
861 new DockedWindowLayoutManager(docked_container); 861 new DockedWindowLayoutManager(docked_container);
862 docked_container->SetLayoutManager( 862 docked_container->SetLayoutManager(
863 base::WrapUnique(docked_window_layout_manager_)); 863 base::WrapUnique(docked_window_layout_manager_));
864 864
865 // Create Panel layout manager 865 // Create Panel layout manager
866 WmWindow* wm_panel_container = GetWmContainer(kShellWindowId_PanelContainer); 866 WmWindow* wm_panel_container = GetWmContainer(kShellWindowId_PanelContainer);
867 panel_layout_manager_ = new PanelLayoutManager(wm_panel_container); 867 panel_layout_manager_ = new PanelLayoutManager(wm_panel_container);
868 wm_panel_container->SetLayoutManager(base::WrapUnique(panel_layout_manager_)); 868 wm_panel_container->aura_window()->SetLayoutManager(panel_layout_manager_);
869 869
870 wm::WmSnapToPixelLayoutManager::InstallOnContainers(root); 870 wm::WmSnapToPixelLayoutManager::InstallOnContainers(root);
871 871
872 // Make it easier to resize windows that partially overlap the shelf. Must 872 // Make it easier to resize windows that partially overlap the shelf. Must
873 // occur after the ShelfLayoutManager is constructed by ShelfWidget. 873 // occur after the ShelfLayoutManager is constructed by ShelfWidget.
874 aura::Window* shelf_container = GetContainer(kShellWindowId_ShelfContainer); 874 aura::Window* shelf_container = GetContainer(kShellWindowId_ShelfContainer);
875 WmWindow* wm_shelf_container = WmWindow::Get(shelf_container); 875 WmWindow* wm_shelf_container = WmWindow::Get(shelf_container);
876 shelf_container->SetEventTargeter(base::MakeUnique<ShelfWindowTargeter>( 876 shelf_container->SetEventTargeter(base::MakeUnique<ShelfWindowTargeter>(
877 wm_shelf_container, wm_shelf_.get())); 877 wm_shelf_container, wm_shelf_.get()));
878 aura::Window* status_container = GetContainer(kShellWindowId_StatusContainer); 878 aura::Window* status_container = GetContainer(kShellWindowId_StatusContainer);
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 EnableTouchHudProjection(); 1142 EnableTouchHudProjection();
1143 else 1143 else
1144 DisableTouchHudProjection(); 1144 DisableTouchHudProjection();
1145 } 1145 }
1146 1146
1147 RootWindowController* GetRootWindowController(const aura::Window* root_window) { 1147 RootWindowController* GetRootWindowController(const aura::Window* root_window) {
1148 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; 1148 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr;
1149 } 1149 }
1150 1150
1151 } // namespace ash 1151 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/wm_snap_to_pixel_layout_manager.cc ('k') | ash/test/wm_window_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698