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 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... | |
36 #endif | 36 #endif |
37 | 37 |
38 // Manages a connection from the client. | 38 // Manages a connection from the client. |
39 class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection | 39 class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection |
40 : public InterfaceImpl<IViewManager>, | 40 : public InterfaceImpl<IViewManager>, |
41 public NodeDelegate { | 41 public NodeDelegate { |
42 public: | 42 public: |
43 ViewManagerConnection(RootNodeManager* root_node_manager); | 43 ViewManagerConnection(RootNodeManager* root_node_manager); |
44 virtual ~ViewManagerConnection(); | 44 virtual ~ViewManagerConnection(); |
45 | 45 |
46 virtual void OnConnectionEstablished() MOJO_OVERRIDE; | |
47 | |
48 TransportConnectionId id() const { return id_; } | 46 TransportConnectionId id() const { return id_; } |
49 | 47 |
50 // Returns the Node with the specified id. | 48 // Returns the Node with the specified id. |
51 Node* GetNode(const NodeId& id) { | 49 Node* GetNode(const NodeId& id) { |
52 return const_cast<Node*>( | 50 return const_cast<Node*>( |
53 const_cast<const ViewManagerConnection*>(this)->GetNode(id)); | 51 const_cast<const ViewManagerConnection*>(this)->GetNode(id)); |
54 } | 52 } |
55 const Node* GetNode(const NodeId& id) const; | 53 const Node* GetNode(const NodeId& id) const; |
56 | 54 |
57 // Returns the View with the specified id. | 55 // Returns the View with the specified id. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 const Callback<void(bool)>& callback) OVERRIDE; | 169 const Callback<void(bool)>& callback) OVERRIDE; |
172 | 170 |
173 // Overridden from NodeDelegate: | 171 // Overridden from NodeDelegate: |
174 virtual void OnNodeHierarchyChanged(const Node* node, | 172 virtual void OnNodeHierarchyChanged(const Node* node, |
175 const Node* new_parent, | 173 const Node* new_parent, |
176 const Node* old_parent) OVERRIDE; | 174 const Node* old_parent) OVERRIDE; |
177 virtual void OnNodeViewReplaced(const Node* node, | 175 virtual void OnNodeViewReplaced(const Node* node, |
178 const View* new_view, | 176 const View* new_view, |
179 const View* old_view) OVERRIDE; | 177 const View* old_view) OVERRIDE; |
180 | 178 |
179 // InterfaceImp overrides: | |
180 virtual void OnConnectionEstablished() MOJO_OVERRIDE; | |
sky
2014/05/23 19:11:55
I'm not changing anything here, just moving to a b
| |
181 | |
181 RootNodeManager* root_node_manager_; | 182 RootNodeManager* root_node_manager_; |
182 | 183 |
183 // Id of this connection as assigned by RootNodeManager. Assigned in | 184 // Id of this connection as assigned by RootNodeManager. Assigned in |
184 // OnConnectionEstablished(). | 185 // OnConnectionEstablished(). |
185 TransportConnectionId id_; | 186 TransportConnectionId id_; |
186 | 187 |
187 NodeMap node_map_; | 188 NodeMap node_map_; |
188 | 189 |
189 ViewMap view_map_; | 190 ViewMap view_map_; |
190 | 191 |
(...skipping 13 matching lines...) Expand all Loading... | |
204 | 205 |
205 #if defined(OS_WIN) | 206 #if defined(OS_WIN) |
206 #pragma warning(pop) | 207 #pragma warning(pop) |
207 #endif | 208 #endif |
208 | 209 |
209 } // namespace service | 210 } // namespace service |
210 } // namespace view_manager | 211 } // namespace view_manager |
211 } // namespace mojo | 212 } // namespace mojo |
212 | 213 |
213 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 214 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
OLD | NEW |