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/mus/root_window_controller.h" | 5 #include "ash/mus/root_window_controller.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 if (GetRequestedContainer(window, &container)) { | 106 if (GetRequestedContainer(window, &container)) { |
107 container_window = GetWindowForContainer(container); | 107 container_window = GetWindowForContainer(container); |
108 } else { | 108 } else { |
109 // TODO(sky): window->bounds() isn't quite right. | 109 // TODO(sky): window->bounds() isn't quite right. |
110 container_window = WmWindowMus::GetMusWindow(wm::GetDefaultParent( | 110 container_window = WmWindowMus::GetMusWindow(wm::GetDefaultParent( |
111 WmWindowMus::Get(root_), WmWindowMus::Get(window), window->bounds())); | 111 WmWindowMus::Get(root_), WmWindowMus::Get(window), window->bounds())); |
112 } | 112 } |
113 DCHECK(WmWindowMus::Get(container_window)->IsContainer()); | 113 DCHECK(WmWindowMus::Get(container_window)->IsContainer()); |
114 | 114 |
115 if (provide_non_client_frame) { | 115 if (provide_non_client_frame) { |
116 NonClientFrameController::Create(GetConnector(), container_window, window, | 116 NonClientFrameController::Create(container_window, window, |
117 window_manager_->window_manager_client()); | 117 window_manager_->window_manager_client()); |
118 } else { | 118 } else { |
119 container_window->AddChild(window); | 119 container_window->AddChild(window); |
120 } | 120 } |
121 | 121 |
122 window_count_++; | 122 window_count_++; |
123 | 123 |
124 return window; | 124 return window; |
125 } | 125 } |
126 | 126 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 base::MakeUnique<DockedWindowLayoutManager>(docked_container)); | 207 base::MakeUnique<DockedWindowLayoutManager>(docked_container)); |
208 | 208 |
209 WmWindowMus* panel_container = | 209 WmWindowMus* panel_container = |
210 GetWindowByShellWindowId(kShellWindowId_PanelContainer); | 210 GetWindowByShellWindowId(kShellWindowId_PanelContainer); |
211 panel_container->SetLayoutManager( | 211 panel_container->SetLayoutManager( |
212 base::MakeUnique<PanelLayoutManager>(panel_container)); | 212 base::MakeUnique<PanelLayoutManager>(panel_container)); |
213 } | 213 } |
214 | 214 |
215 } // namespace mus | 215 } // namespace mus |
216 } // namespace ash | 216 } // namespace ash |
OLD | NEW |