| 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/common/wm/container_finder.h" | 7 #include "ash/common/wm/container_finder.h" |
| 8 #include "ash/common/wm/window_state.h" | 8 #include "ash/common/wm/window_state.h" |
| 9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
| 10 #include "ash/common/wm_window.h" | 10 #include "ash/common/wm_window.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 aura::Window* window = new aura::Window(nullptr); | 137 aura::Window* window = new aura::Window(nullptr); |
| 138 aura::SetWindowType(window, window_type); | 138 aura::SetWindowType(window, window_type); |
| 139 // Apply properties before Init(), that way they are sent to the server at | 139 // Apply properties before Init(), that way they are sent to the server at |
| 140 // the time the window is created. | 140 // the time the window is created. |
| 141 aura::PropertyConverter* property_converter = | 141 aura::PropertyConverter* property_converter = |
| 142 window_manager->property_converter(); | 142 window_manager->property_converter(); |
| 143 for (auto& property_pair : *properties) { | 143 for (auto& property_pair : *properties) { |
| 144 property_converter->SetPropertyFromTransportValue( | 144 property_converter->SetPropertyFromTransportValue( |
| 145 window, property_pair.first, &property_pair.second); | 145 window, property_pair.first, &property_pair.second); |
| 146 } | 146 } |
| 147 window->Init(ui::LAYER_TEXTURED); | 147 window->Init(ui::LAYER_SURFACE); |
| 148 window->SetBounds(bounds); | 148 window->SetBounds(bounds); |
| 149 | 149 |
| 150 if (container_window) { | 150 if (container_window) { |
| 151 container_window->AddChild(window); | 151 container_window->AddChild(window); |
| 152 } else { | 152 } else { |
| 153 WmWindow* root = root_window_controller->GetWindow(); | 153 WmWindow* root = root_window_controller->GetWindow(); |
| 154 gfx::Point origin = | 154 gfx::Point origin = |
| 155 root->ConvertPointToTarget(root->GetRootWindow(), gfx::Point()); | 155 root->ConvertPointToTarget(root->GetRootWindow(), gfx::Point()); |
| 156 origin += root_window_controller->GetWindow() | 156 origin += root_window_controller->GetWindow() |
| 157 ->GetDisplayNearestWindow() | 157 ->GetDisplayNearestWindow() |
| (...skipping 26 matching lines...) Expand all Loading... |
| 184 (*properties) | 184 (*properties) |
| 185 [ui::mojom::WindowManager::kWindowIgnoredByShelf_Property])); | 185 [ui::mojom::WindowManager::kWindowIgnoredByShelf_Property])); |
| 186 // No need to persist this value. | 186 // No need to persist this value. |
| 187 properties->erase(ui::mojom::WindowManager::kWindowIgnoredByShelf_Property); | 187 properties->erase(ui::mojom::WindowManager::kWindowIgnoredByShelf_Property); |
| 188 } | 188 } |
| 189 return window; | 189 return window; |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace mus | 192 } // namespace mus |
| 193 } // namespace ash | 193 } // namespace ash |
| OLD | NEW |