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 #ifndef COMPONENTS_MUS_WS_CONNECTION_MANAGER_H_ | 5 #ifndef COMPONENTS_MUS_WS_CONNECTION_MANAGER_H_ |
6 #define COMPONENTS_MUS_WS_CONNECTION_MANAGER_H_ | 6 #define COMPONENTS_MUS_WS_CONNECTION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
| 10 #include <vector> |
10 | 11 |
11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
14 #include "components/mus/public/interfaces/window_tree.mojom.h" | 15 #include "components/mus/public/interfaces/window_tree.mojom.h" |
15 #include "components/mus/public/interfaces/window_tree_host.mojom.h" | 16 #include "components/mus/public/interfaces/window_tree_host.mojom.h" |
16 #include "components/mus/surfaces/surfaces_state.h" | 17 #include "components/mus/surfaces/surfaces_state.h" |
17 #include "components/mus/ws/ids.h" | 18 #include "components/mus/ws/ids.h" |
18 #include "components/mus/ws/operation.h" | 19 #include "components/mus/ws/operation.h" |
19 #include "components/mus/ws/server_window_delegate.h" | 20 #include "components/mus/ws/server_window_delegate.h" |
(...skipping 19 matching lines...) Expand all Loading... |
39 public: | 40 public: |
40 ConnectionManager(ConnectionManagerDelegate* delegate, | 41 ConnectionManager(ConnectionManagerDelegate* delegate, |
41 const scoped_refptr<mus::SurfacesState>& surfaces_state); | 42 const scoped_refptr<mus::SurfacesState>& surfaces_state); |
42 ~ConnectionManager() override; | 43 ~ConnectionManager() override; |
43 | 44 |
44 // Adds a WindowTreeHost. | 45 // Adds a WindowTreeHost. |
45 void AddHost(WindowTreeHostConnection* connection); | 46 void AddHost(WindowTreeHostConnection* connection); |
46 | 47 |
47 // Creates a new ServerWindow. The return value is owned by the caller, but | 48 // Creates a new ServerWindow. The return value is owned by the caller, but |
48 // must be destroyed before ConnectionManager. | 49 // must be destroyed before ConnectionManager. |
49 ServerWindow* CreateServerWindow(const WindowId& id); | 50 ServerWindow* CreateServerWindow( |
| 51 const WindowId& id, |
| 52 const std::map<std::string, std::vector<uint8_t>>& properties); |
50 | 53 |
51 // Returns the id for the next WindowTreeImpl. | 54 // Returns the id for the next WindowTreeImpl. |
52 ConnectionSpecificId GetAndAdvanceNextConnectionId(); | 55 ConnectionSpecificId GetAndAdvanceNextConnectionId(); |
53 | 56 |
54 // Returns the id for the next WindowTreeHostImpl. | 57 // Returns the id for the next WindowTreeHostImpl. |
55 uint16_t GetAndAdvanceNextHostId(); | 58 uint16_t GetAndAdvanceNextHostId(); |
56 | 59 |
57 // Invoked when a WindowTreeImpl's connection encounters an error. | 60 // Invoked when a WindowTreeImpl's connection encounters an error. |
58 void OnConnectionError(ClientConnection* connection); | 61 void OnConnectionError(ClientConnection* connection); |
59 | 62 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 // Next id supplied to the window manager. | 262 // Next id supplied to the window manager. |
260 uint32_t next_wm_change_id_; | 263 uint32_t next_wm_change_id_; |
261 | 264 |
262 DISALLOW_COPY_AND_ASSIGN(ConnectionManager); | 265 DISALLOW_COPY_AND_ASSIGN(ConnectionManager); |
263 }; | 266 }; |
264 | 267 |
265 } // namespace ws | 268 } // namespace ws |
266 } // namespace mus | 269 } // namespace mus |
267 | 270 |
268 #endif // COMPONENTS_MUS_WS_CONNECTION_MANAGER_H_ | 271 #endif // COMPONENTS_MUS_WS_CONNECTION_MANAGER_H_ |
OLD | NEW |