| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/top_level_window_factory.h" | 5 #include "ash/mus/top_level_window_factory.h" |
| 6 | 6 |
| 7 #include "ash/mus/disconnected_app_handler.h" | 7 #include "ash/mus/disconnected_app_handler.h" |
| 8 #include "ash/mus/frame/detached_title_area_renderer.h" | 8 #include "ash/mus/frame/detached_title_area_renderer.h" |
| 9 #include "ash/mus/non_client_frame_controller.h" | 9 #include "ash/mus/non_client_frame_controller.h" |
| 10 #include "ash/mus/property_util.h" | 10 #include "ash/mus/property_util.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 container_window->AddChild(window); | 180 container_window->AddChild(window); |
| 181 } else { | 181 } else { |
| 182 WmWindow* root = root_window_controller->GetWindow(); | 182 WmWindow* root = root_window_controller->GetWindow(); |
| 183 gfx::Point origin = | 183 gfx::Point origin = |
| 184 root->ConvertPointToTarget(root->GetRootWindow(), gfx::Point()); | 184 root->ConvertPointToTarget(root->GetRootWindow(), gfx::Point()); |
| 185 origin += root_window_controller->GetWindow() | 185 origin += root_window_controller->GetWindow() |
| 186 ->GetDisplayNearestWindow() | 186 ->GetDisplayNearestWindow() |
| 187 .bounds() | 187 .bounds() |
| 188 .OffsetFromOrigin(); | 188 .OffsetFromOrigin(); |
| 189 gfx::Rect bounds_in_screen(origin, bounds.size()); | 189 gfx::Rect bounds_in_screen(origin, bounds.size()); |
| 190 ash::wm::GetDefaultParent(WmWindow::Get(window), bounds_in_screen) | 190 ash::wm::GetDefaultParent(window, bounds_in_screen)->AddChild(window); |
| 191 ->aura_window() | |
| 192 ->AddChild(window); | |
| 193 } | 191 } |
| 194 return window; | 192 return window; |
| 195 } | 193 } |
| 196 | 194 |
| 197 } // namespace | 195 } // namespace |
| 198 | 196 |
| 199 aura::Window* CreateAndParentTopLevelWindow( | 197 aura::Window* CreateAndParentTopLevelWindow( |
| 200 WindowManager* window_manager, | 198 WindowManager* window_manager, |
| 201 ui::mojom::WindowType window_type, | 199 ui::mojom::WindowType window_type, |
| 202 std::map<std::string, std::vector<uint8_t>>* properties) { | 200 std::map<std::string, std::vector<uint8_t>>* properties) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 226 if (non_client_frame_controller) | 224 if (non_client_frame_controller) |
| 227 non_client_frame_controller->set_can_activate(can_focus); | 225 non_client_frame_controller->set_can_activate(can_focus); |
| 228 // No need to persist this value. | 226 // No need to persist this value. |
| 229 properties->erase(focusable_iter); | 227 properties->erase(focusable_iter); |
| 230 } | 228 } |
| 231 return window; | 229 return window; |
| 232 } | 230 } |
| 233 | 231 |
| 234 } // namespace mus | 232 } // namespace mus |
| 235 } // namespace ash | 233 } // namespace ash |
| OLD | NEW |