| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/mus/ws/forwarding_window_manager.h" | 5 #include "components/mus/ws/forwarding_window_manager.h" |
| 6 | 6 |
| 7 #include "components/mus/ws/connection_manager.h" | 7 #include "components/mus/ws/connection_manager.h" |
| 8 #include "components/mus/ws/window_tree_host_impl.h" | 8 #include "components/mus/ws/window_tree_host_impl.h" |
| 9 | 9 |
| 10 namespace mus { | 10 namespace mus { |
| 11 namespace ws { | 11 namespace ws { |
| 12 | 12 |
| 13 ForwardingWindowManager::ForwardingWindowManager( | 13 ForwardingWindowManager::ForwardingWindowManager( |
| 14 ConnectionManager* connection_manager) | 14 ConnectionManager* connection_manager) |
| 15 : connection_manager_(connection_manager) {} | 15 : connection_manager_(connection_manager) {} |
| 16 | 16 |
| 17 ForwardingWindowManager::~ForwardingWindowManager() {} | 17 ForwardingWindowManager::~ForwardingWindowManager() {} |
| 18 | 18 |
| 19 mojom::WindowManager* ForwardingWindowManager::GetActiveWindowManager() { | 19 mojom::WindowManagerDeprecated* |
| 20 ForwardingWindowManager::GetActiveWindowManager() { |
| 20 // TODO(sky): This needs to detect active window, or OpenWindow() needs to | 21 // TODO(sky): This needs to detect active window, or OpenWindow() needs to |
| 21 // take the display. | 22 // take the display. |
| 22 return connection_manager_->GetActiveWindowTreeHost()->window_manager(); | 23 return connection_manager_->GetActiveWindowTreeHost()->window_manager(); |
| 23 } | 24 } |
| 24 | 25 |
| 25 void ForwardingWindowManager::OpenWindow( | 26 void ForwardingWindowManager::OpenWindow( |
| 26 mus::mojom::WindowTreeClientPtr client, | 27 mus::mojom::WindowTreeClientPtr client, |
| 27 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) { | 28 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) { |
| 28 GetActiveWindowManager()->OpenWindow(std::move(client), | 29 GetActiveWindowManager()->OpenWindow(std::move(client), |
| 29 std::move(properties)); | 30 std::move(properties)); |
| 30 } | 31 } |
| 31 | 32 |
| 32 } // namespace ws | 33 } // namespace ws |
| 33 } // namespace mus | 34 } // namespace mus |
| OLD | NEW |