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