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 MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 bool DeleteViewImpl(ViewManagerConnection* source, | 79 bool DeleteViewImpl(ViewManagerConnection* source, |
80 const ViewId& view_id, | 80 const ViewId& view_id, |
81 TransportChangeId change_id); | 81 TransportChangeId change_id); |
82 | 82 |
83 // Sets the view associated with a node. | 83 // Sets the view associated with a node. |
84 bool SetViewImpl(const NodeId& node_id, | 84 bool SetViewImpl(const NodeId& node_id, |
85 const ViewId& view_id, | 85 const ViewId& view_id, |
86 TransportChangeId change_id); | 86 TransportChangeId change_id); |
87 | 87 |
88 // Overridden from IViewManager: | 88 // Overridden from IViewManager: |
89 virtual void SetClient(IViewManagerClient* client) OVERRIDE; | |
90 virtual void CreateNode(TransportConnectionSpecificNodeId node_id, | 89 virtual void CreateNode(TransportConnectionSpecificNodeId node_id, |
91 const Callback<void(bool)>& callback) OVERRIDE; | 90 const Callback<void(bool)>& callback) OVERRIDE; |
92 virtual void DeleteNode(TransportNodeId transport_node_id, | 91 virtual void DeleteNode(TransportNodeId transport_node_id, |
93 TransportChangeId change_id, | 92 TransportChangeId change_id, |
94 const Callback<void(bool)>& callback) OVERRIDE; | 93 const Callback<void(bool)>& callback) OVERRIDE; |
95 virtual void AddNode(TransportNodeId parent_id, | 94 virtual void AddNode(TransportNodeId parent_id, |
96 TransportNodeId child_id, | 95 TransportNodeId child_id, |
97 TransportChangeId server_change_id, | 96 TransportChangeId server_change_id, |
98 TransportChangeId client_change_id, | 97 TransportChangeId client_change_id, |
99 const Callback<void(bool)>& callback) OVERRIDE; | 98 const Callback<void(bool)>& callback) OVERRIDE; |
(...skipping 19 matching lines...) Expand all Loading... |
119 uint32_t buffer_size) OVERRIDE; | 118 uint32_t buffer_size) OVERRIDE; |
120 | 119 |
121 // Overridden from NodeDelegate: | 120 // Overridden from NodeDelegate: |
122 virtual void OnNodeHierarchyChanged(const NodeId& node, | 121 virtual void OnNodeHierarchyChanged(const NodeId& node, |
123 const NodeId& new_parent, | 122 const NodeId& new_parent, |
124 const NodeId& old_parent) OVERRIDE; | 123 const NodeId& old_parent) OVERRIDE; |
125 virtual void OnNodeViewReplaced(const NodeId& node, | 124 virtual void OnNodeViewReplaced(const NodeId& node, |
126 const ViewId& new_view_id, | 125 const ViewId& new_view_id, |
127 const ViewId& old_view_id) OVERRIDE; | 126 const ViewId& old_view_id) OVERRIDE; |
128 | 127 |
129 IViewManagerClient* client_; | |
130 | |
131 // Id of this connection as assigned by RootNodeManager. Assigned in | 128 // Id of this connection as assigned by RootNodeManager. Assigned in |
132 // Initialize(). | 129 // Initialize(). |
133 TransportConnectionId id_; | 130 TransportConnectionId id_; |
134 | 131 |
135 NodeMap node_map_; | 132 NodeMap node_map_; |
136 | 133 |
137 ViewMap view_map_; | 134 ViewMap view_map_; |
138 | 135 |
139 DISALLOW_COPY_AND_ASSIGN(ViewManagerConnection); | 136 DISALLOW_COPY_AND_ASSIGN(ViewManagerConnection); |
140 }; | 137 }; |
141 | 138 |
142 #if defined(OS_WIN) | 139 #if defined(OS_WIN) |
143 #pragma warning(pop) | 140 #pragma warning(pop) |
144 #endif | 141 #endif |
145 | 142 |
146 } // namespace view_manager | 143 } // namespace view_manager |
147 } // namespace services | 144 } // namespace services |
148 } // namespace mojo | 145 } // namespace mojo |
149 | 146 |
150 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 147 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
OLD | NEW |