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/bridge/wm_root_window_controller_mus.h" | 5 #include "ash/mus/bridge/wm_root_window_controller_mus.h" |
6 | 6 |
7 #include "ash/mus/bridge/wm_shelf_mus.h" | 7 #include "ash/mus/bridge/wm_shelf_mus.h" |
8 #include "ash/mus/bridge/wm_shell_mus.h" | 8 #include "ash/mus/bridge/wm_shell_mus.h" |
9 #include "ash/mus/bridge/wm_window_mus.h" | 9 #include "ash/mus/bridge/wm_window_mus.h" |
10 #include "ash/mus/root_window_controller.h" | 10 #include "ash/mus/root_window_controller.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 init_params->parent_mus = WmWindowMus::GetMusWindow( | 101 init_params->parent_mus = WmWindowMus::GetMusWindow( |
102 WmWindowMus::Get(root_window_controller_->root()) | 102 WmWindowMus::Get(root_window_controller_->root()) |
103 ->GetChildByShellWindowId(shell_container_id)); | 103 ->GetChildByShellWindowId(shell_container_id)); |
104 DCHECK(init_params->parent_mus); | 104 DCHECK(init_params->parent_mus); |
105 ui::Window* new_window = | 105 ui::Window* new_window = |
106 root_window_controller_->root()->window_tree()->NewWindow( | 106 root_window_controller_->root()->window_tree()->NewWindow( |
107 &(init_params->mus_properties)); | 107 &(init_params->mus_properties)); |
108 WmWindowMus::Get(new_window) | 108 WmWindowMus::Get(new_window) |
109 ->set_widget(widget, WmWindowMus::WidgetCreationType::INTERNAL); | 109 ->set_widget(widget, WmWindowMus::WidgetCreationType::INTERNAL); |
110 init_params->native_widget = new views::NativeWidgetMus( | 110 init_params->native_widget = new views::NativeWidgetMus( |
111 widget, new_window, ui::mojom::SurfaceType::DEFAULT); | 111 widget, new_window, ui::mojom::CompositorFrameSinkType::DEFAULT); |
112 } | 112 } |
113 | 113 |
114 WmWindow* WmRootWindowControllerMus::FindEventTarget( | 114 WmWindow* WmRootWindowControllerMus::FindEventTarget( |
115 const gfx::Point& location_in_screen) { | 115 const gfx::Point& location_in_screen) { |
116 NOTIMPLEMENTED(); | 116 NOTIMPLEMENTED(); |
117 return nullptr; | 117 return nullptr; |
118 } | 118 } |
119 | 119 |
120 gfx::Point WmRootWindowControllerMus::GetLastMouseLocationInRoot() { | 120 gfx::Point WmRootWindowControllerMus::GetLastMouseLocationInRoot() { |
121 gfx::Point location = root_window_controller_->window_manager() | 121 gfx::Point location = root_window_controller_->window_manager() |
122 ->window_tree_client() | 122 ->window_tree_client() |
123 ->GetCursorScreenPoint(); | 123 ->GetCursorScreenPoint(); |
124 location -= | 124 location -= |
125 root_window_controller_->display().bounds().origin().OffsetFromOrigin(); | 125 root_window_controller_->display().bounds().origin().OffsetFromOrigin(); |
126 return location; | 126 return location; |
127 } | 127 } |
128 | 128 |
129 bool WmRootWindowControllerMus::ShouldDestroyWindowInCloseChildWindows( | 129 bool WmRootWindowControllerMus::ShouldDestroyWindowInCloseChildWindows( |
130 WmWindow* window) { | 130 WmWindow* window) { |
131 ui::Window* ui_window = WmWindowMus::GetMusWindow(window); | 131 ui::Window* ui_window = WmWindowMus::GetMusWindow(window); |
132 return ui_window->WasCreatedByThisClient() || | 132 return ui_window->WasCreatedByThisClient() || |
133 ui_window->window_tree()->GetRoots().count(ui_window); | 133 ui_window->window_tree()->GetRoots().count(ui_window); |
134 } | 134 } |
135 | 135 |
136 } // namespace mus | 136 } // namespace mus |
137 } // namespace ash | 137 } // namespace ash |
OLD | NEW |