Chromium Code Reviews| 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" |
| 11 #include "ash/mus/disconnected_app_handler.h" | 11 #include "ash/mus/disconnected_app_handler.h" |
| 12 #include "ash/mus/non_client_frame_controller.h" | 12 #include "ash/mus/non_client_frame_controller.h" |
| 13 #include "ash/mus/property_util.h" | 13 #include "ash/mus/property_util.h" |
| 14 #include "ash/mus/window_manager.h" | 14 #include "ash/mus/window_manager.h" |
| 15 #include "ash/public/cpp/shell_window_ids.h" | 15 #include "ash/public/cpp/shell_window_ids.h" |
| 16 #include "ash/root_window_controller.h" | 16 #include "ash/root_window_controller.h" |
| 17 #include "ash/root_window_settings.h" | 17 #include "ash/root_window_settings.h" |
| 18 #include "mojo/public/cpp/bindings/type_converter.h" | 18 #include "mojo/public/cpp/bindings/type_converter.h" |
| 19 #include "services/ui/public/cpp/property_type_converters.h" | 19 #include "services/ui/public/cpp/property_type_converters.h" |
| 20 #include "services/ui/public/interfaces/window_manager.mojom.h" | 20 #include "services/ui/public/interfaces/window_manager.mojom.h" |
| 21 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" | 21 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" |
| 22 #include "ui/aura/mus/property_converter.h" | 22 #include "ui/aura/mus/property_converter.h" |
| 23 #include "ui/aura/mus/property_utils.h" | 23 #include "ui/aura/mus/property_utils.h" |
| 24 #include "ui/aura/mus/window_tree_client.h" | |
| 24 #include "ui/aura/window.h" | 25 #include "ui/aura/window.h" |
| 25 #include "ui/display/display.h" | 26 #include "ui/display/display.h" |
| 26 | 27 |
| 27 namespace ash { | 28 namespace ash { |
| 28 namespace mus { | 29 namespace mus { |
| 29 namespace { | 30 namespace { |
| 30 | 31 |
| 31 // Returns true if a fullscreen window was requested. | 32 // Returns true if a fullscreen window was requested. |
| 32 bool IsFullscreen(aura::PropertyConverter* property_converter, | 33 bool IsFullscreen(aura::PropertyConverter* property_converter, |
| 33 const std::vector<uint8_t>& transport_data) { | 34 const std::vector<uint8_t>& transport_data) { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 176 GetRootWindowControllerForNewTopLevelWindow(properties); | 177 GetRootWindowControllerForNewTopLevelWindow(properties); |
| 177 aura::Window* window = CreateAndParentTopLevelWindowInRoot( | 178 aura::Window* window = CreateAndParentTopLevelWindowInRoot( |
| 178 window_manager, root_window_controller, window_type, properties); | 179 window_manager, root_window_controller, window_type, properties); |
| 179 DisconnectedAppHandler::Create(window); | 180 DisconnectedAppHandler::Create(window); |
| 180 if (properties->count( | 181 if (properties->count( |
| 181 ui::mojom::WindowManager::kWindowIgnoredByShelf_Property)) { | 182 ui::mojom::WindowManager::kWindowIgnoredByShelf_Property)) { |
| 182 wm::WindowState* window_state = WmWindow::Get(window)->GetWindowState(); | 183 wm::WindowState* window_state = WmWindow::Get(window)->GetWindowState(); |
| 183 window_state->set_ignored_by_shelf(mojo::ConvertTo<bool>( | 184 window_state->set_ignored_by_shelf(mojo::ConvertTo<bool>( |
| 184 (*properties) | 185 (*properties) |
| 185 [ui::mojom::WindowManager::kWindowIgnoredByShelf_Property])); | 186 [ui::mojom::WindowManager::kWindowIgnoredByShelf_Property])); |
| 186 // No need to persist this value. | 187 // No need to persist this value. |
|
sky
2017/01/26 18:59:04
Any properties left in properties are mirrored to
Hadi
2017/01/26 20:23:17
Done.
| |
| 187 properties->erase(ui::mojom::WindowManager::kWindowIgnoredByShelf_Property); | 188 properties->erase(ui::mojom::WindowManager::kWindowIgnoredByShelf_Property); |
| 188 } | 189 } |
| 190 if (properties->count(ui::mojom::WindowManager::kFocusable_InitProperty)) { | |
| 191 window_manager->window_tree_client()->SetCanFocus( | |
| 192 window, | |
| 193 mojo::ConvertTo<bool>( | |
| 194 (*properties)[ui::mojom::WindowManager::kFocusable_InitProperty])); | |
| 195 } | |
| 189 return window; | 196 return window; |
| 190 } | 197 } |
| 191 | 198 |
| 192 } // namespace mus | 199 } // namespace mus |
| 193 } // namespace ash | 200 } // namespace ash |
| OLD | NEW |