| OLD | NEW |
| 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 23 matching lines...) Expand all Loading... |
| 34 #include "ash/common/wm/switchable_windows.h" | 34 #include "ash/common/wm/switchable_windows.h" |
| 35 #include "ash/common/wm/system_modal_container_layout_manager.h" | 35 #include "ash/common/wm/system_modal_container_layout_manager.h" |
| 36 #include "ash/common/wm/window_state.h" | 36 #include "ash/common/wm/window_state.h" |
| 37 #include "ash/common/wm/wm_screen_util.h" | 37 #include "ash/common/wm/wm_screen_util.h" |
| 38 #include "ash/common/wm/workspace/workspace_layout_manager.h" | 38 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
| 39 #include "ash/common/wm/workspace_controller.h" | 39 #include "ash/common/wm/workspace_controller.h" |
| 40 #include "ash/common/wm_shell.h" | 40 #include "ash/common/wm_shell.h" |
| 41 #include "ash/common/wm_window.h" | 41 #include "ash/common/wm_window.h" |
| 42 #include "ash/high_contrast/high_contrast_controller.h" | 42 #include "ash/high_contrast/high_contrast_controller.h" |
| 43 #include "ash/host/ash_window_tree_host.h" | 43 #include "ash/host/ash_window_tree_host.h" |
| 44 #include "ash/public/cpp/config.h" |
| 44 #include "ash/public/cpp/shelf_types.h" | 45 #include "ash/public/cpp/shelf_types.h" |
| 45 #include "ash/public/cpp/shell_window_ids.h" | 46 #include "ash/public/cpp/shell_window_ids.h" |
| 46 #include "ash/root_window_settings.h" | 47 #include "ash/root_window_settings.h" |
| 47 #include "ash/shelf/shelf_window_targeter.h" | 48 #include "ash/shelf/shelf_window_targeter.h" |
| 48 #include "ash/shell.h" | 49 #include "ash/shell.h" |
| 49 #include "ash/touch/touch_hud_debug.h" | 50 #include "ash/touch/touch_hud_debug.h" |
| 50 #include "ash/touch/touch_hud_projection.h" | 51 #include "ash/touch/touch_hud_projection.h" |
| 51 #include "ash/touch/touch_observer_hud.h" | 52 #include "ash/touch/touch_observer_hud.h" |
| 52 #include "ash/wm/boot_splash_screen_chromeos.h" | 53 #include "ash/wm/boot_splash_screen_chromeos.h" |
| 53 #include "ash/wm/panels/attached_panel_window_targeter.h" | 54 #include "ash/wm/panels/attached_panel_window_targeter.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 ReparentWindow(*iter, dst_container); | 245 ReparentWindow(*iter, dst_container); |
| 245 } | 246 } |
| 246 } | 247 } |
| 247 } | 248 } |
| 248 | 249 |
| 249 // Creates a new window for use as a container. | 250 // Creates a new window for use as a container. |
| 250 // TODO(sky): This should create an aura::Window. http://crbug.com/671246. | 251 // TODO(sky): This should create an aura::Window. http://crbug.com/671246. |
| 251 WmWindow* CreateContainer(int window_id, const char* name, WmWindow* parent) { | 252 WmWindow* CreateContainer(int window_id, const char* name, WmWindow* parent) { |
| 252 aura::Window* window = new aura::Window(nullptr, ui::wm::WINDOW_TYPE_UNKNOWN); | 253 aura::Window* window = new aura::Window(nullptr, ui::wm::WINDOW_TYPE_UNKNOWN); |
| 253 window->Init(ui::LAYER_NOT_DRAWN); | 254 window->Init(ui::LAYER_NOT_DRAWN); |
| 254 if (WmShell::Get()->IsRunningInMash()) { | 255 if (Shell::GetAshConfig() != Config::CLASSIC) { |
| 255 aura::WindowPortMus::Get(window)->SetEventTargetingPolicy( | 256 aura::WindowPortMus::Get(window)->SetEventTargetingPolicy( |
| 256 ui::mojom::EventTargetingPolicy::DESCENDANTS_ONLY); | 257 ui::mojom::EventTargetingPolicy::DESCENDANTS_ONLY); |
| 257 } | 258 } |
| 258 window->set_id(window_id); | 259 window->set_id(window_id); |
| 259 window->SetName(name); | 260 window->SetName(name); |
| 260 parent->aura_window()->AddChild(window); | 261 parent->aura_window()->AddChild(window); |
| 261 if (window_id != kShellWindowId_UnparentedControlContainer) | 262 if (window_id != kShellWindowId_UnparentedControlContainer) |
| 262 window->Show(); | 263 window->Show(); |
| 263 return WmWindow::Get(window); | 264 return WmWindow::Get(window); |
| 264 } | 265 } |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 EnableTouchHudProjection(); | 1102 EnableTouchHudProjection(); |
| 1102 else | 1103 else |
| 1103 DisableTouchHudProjection(); | 1104 DisableTouchHudProjection(); |
| 1104 } | 1105 } |
| 1105 | 1106 |
| 1106 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1107 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
| 1107 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1108 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
| 1108 } | 1109 } |
| 1109 | 1110 |
| 1110 } // namespace ash | 1111 } // namespace ash |
| OLD | NEW |