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_shell_mus.h" | 5 #include "ash/mus/bridge/wm_shell_mus.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.h" |
10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 root_window_controllers_) { | 197 root_window_controllers_) { |
198 if (root_window_controller->GetDisplay().id() == id) | 198 if (root_window_controller->GetDisplay().id() == id) |
199 return root_window_controller; | 199 return root_window_controller; |
200 } | 200 } |
201 NOTREACHED(); | 201 NOTREACHED(); |
202 return nullptr; | 202 return nullptr; |
203 } | 203 } |
204 | 204 |
205 WmWindow* WmShellMus::NewWindow(ui::wm::WindowType window_type, | 205 WmWindow* WmShellMus::NewWindow(ui::wm::WindowType window_type, |
206 ui::LayerType layer_type) { | 206 ui::LayerType layer_type) { |
207 WmWindowMus* window = WmWindowMus::Get(window_tree_client()->NewWindow()); | 207 ui::Window* uiwindow = nullptr; |
| 208 if (layer_type == ui::LAYER_NOT_DRAWN) |
| 209 uiwindow = window_tree_client()->NewWindowContainer(); |
| 210 else |
| 211 uiwindow = window_tree_client()->NewWindow(); |
| 212 WmWindowMus* window = WmWindowMus::Get(uiwindow); |
208 window->set_wm_window_type(window_type); | 213 window->set_wm_window_type(window_type); |
209 // TODO(sky): support layer_type. | 214 // TODO(sky): support layer_type. |
210 NOTIMPLEMENTED(); | 215 NOTIMPLEMENTED(); |
211 return window; | 216 return window; |
212 } | 217 } |
213 | 218 |
214 WmWindow* WmShellMus::GetFocusedWindow() { | 219 WmWindow* WmShellMus::GetFocusedWindow() { |
215 return WmWindowMus::Get(window_tree_client()->GetFocusedWindow()); | 220 return WmWindowMus::Get(window_tree_client()->GetFocusedWindow()); |
216 } | 221 } |
217 | 222 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 OnWindowActivated(gained_active, lost_active)); | 451 OnWindowActivated(gained_active, lost_active)); |
447 } | 452 } |
448 | 453 |
449 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { | 454 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { |
450 DCHECK_EQ(window_tree_client(), client); | 455 DCHECK_EQ(window_tree_client(), client); |
451 client->RemoveObserver(this); | 456 client->RemoveObserver(this); |
452 } | 457 } |
453 | 458 |
454 } // namespace mus | 459 } // namespace mus |
455 } // namespace ash | 460 } // namespace ash |
OLD | NEW |