OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/connection_manager.h" | 5 #include "components/mus/ws/connection_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "components/mus/ws/client_connection.h" | 9 #include "components/mus/ws/client_connection.h" |
10 #include "components/mus/ws/connection_manager_delegate.h" | 10 #include "components/mus/ws/connection_manager_delegate.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 void ConnectionManager::AddHost(WindowTreeHostConnection* host_connection) { | 52 void ConnectionManager::AddHost(WindowTreeHostConnection* host_connection) { |
53 DCHECK_EQ(0u, | 53 DCHECK_EQ(0u, |
54 host_connection_map_.count(host_connection->window_tree_host())); | 54 host_connection_map_.count(host_connection->window_tree_host())); |
55 const bool is_first_connection = host_connection_map_.empty(); | 55 const bool is_first_connection = host_connection_map_.empty(); |
56 host_connection_map_[host_connection->window_tree_host()] = host_connection; | 56 host_connection_map_[host_connection->window_tree_host()] = host_connection; |
57 if (is_first_connection) | 57 if (is_first_connection) |
58 delegate_->OnFirstRootConnectionCreated(); | 58 delegate_->OnFirstRootConnectionCreated(); |
59 } | 59 } |
60 | 60 |
61 ServerWindow* ConnectionManager::CreateServerWindow(const WindowId& id) { | 61 ServerWindow* ConnectionManager::CreateServerWindow( |
62 ServerWindow* window = new ServerWindow(this, id); | 62 const WindowId& id, |
| 63 const std::map<std::string, std::vector<uint8_t>>& properties) { |
| 64 ServerWindow* window = new ServerWindow(this, id, properties); |
63 window->AddObserver(this); | 65 window->AddObserver(this); |
64 return window; | 66 return window; |
65 } | 67 } |
66 | 68 |
67 ConnectionSpecificId ConnectionManager::GetAndAdvanceNextConnectionId() { | 69 ConnectionSpecificId ConnectionManager::GetAndAdvanceNextConnectionId() { |
68 const ConnectionSpecificId id = next_connection_id_++; | 70 const ConnectionSpecificId id = next_connection_id_++; |
69 DCHECK_LT(id, next_connection_id_); | 71 DCHECK_LT(id, next_connection_id_); |
70 return id; | 72 return id; |
71 } | 73 } |
72 | 74 |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 return; | 501 return; |
500 for (auto& pair : connection_map_) { | 502 for (auto& pair : connection_map_) { |
501 pair.second->service()->ProcessTransientWindowRemoved( | 503 pair.second->service()->ProcessTransientWindowRemoved( |
502 window, transient_child, IsOperationSource(pair.first)); | 504 window, transient_child, IsOperationSource(pair.first)); |
503 } | 505 } |
504 } | 506 } |
505 | 507 |
506 } // namespace ws | 508 } // namespace ws |
507 | 509 |
508 } // namespace mus | 510 } // namespace mus |
OLD | NEW |