Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: mojo/services/view_manager/root_node_manager.h

Issue 396703002: Makes Embed() take a single node (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_ROOT_NODE_MANAGER_H_ 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_ 6 #define MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 void AddConnection(ViewManagerServiceImpl* connection); 96 void AddConnection(ViewManagerServiceImpl* connection);
97 void RemoveConnection(ViewManagerServiceImpl* connection); 97 void RemoveConnection(ViewManagerServiceImpl* connection);
98 98
99 // Establishes the initial client. Similar to Connect(), but the resulting 99 // Establishes the initial client. Similar to Connect(), but the resulting
100 // client is allowed to do anything. 100 // client is allowed to do anything.
101 void EmbedRoot(const std::string& url); 101 void EmbedRoot(const std::string& url);
102 102
103 // See description of ViewManagerService::Embed() for details. This assumes 103 // See description of ViewManagerService::Embed() for details. This assumes
104 // |node_ids| has been validated. 104 // |transport_node_id| is valid.
105 void Embed(ConnectionSpecificId creator_id, 105 void Embed(ConnectionSpecificId creator_id,
106 const String& url, 106 const String& url,
107 const Array<Id>& node_ids); 107 Id transport_node_id);
108 108
109 // Returns the connection by id. 109 // Returns the connection by id.
110 ViewManagerServiceImpl* GetConnection(ConnectionSpecificId connection_id); 110 ViewManagerServiceImpl* GetConnection(ConnectionSpecificId connection_id);
111 111
112 // Returns the Node identified by |id|. 112 // Returns the Node identified by |id|.
113 Node* GetNode(const NodeId& id); 113 Node* GetNode(const NodeId& id);
114 114
115 // Returns the View identified by |id|. 115 // Returns the View identified by |id|.
116 View* GetView(const ViewId& id); 116 View* GetView(const ViewId& id);
117 117
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Balances a call to PrepareForChange(). 178 // Balances a call to PrepareForChange().
179 void FinishChange(); 179 void FinishChange();
180 180
181 // Returns true if the specified connection originated the current change. 181 // Returns true if the specified connection originated the current change.
182 bool IsChangeSource(ConnectionSpecificId connection_id) const { 182 bool IsChangeSource(ConnectionSpecificId connection_id) const {
183 return current_change_ && current_change_->connection_id() == connection_id; 183 return current_change_ && current_change_->connection_id() == connection_id;
184 } 184 }
185 185
186 // Implementation of the two embed variants. 186 // Implementation of the two embed variants.
187 ViewManagerServiceImpl* EmbedImpl(ConnectionSpecificId creator_id, 187 ViewManagerServiceImpl* EmbedImpl(ConnectionSpecificId creator_id,
188 const String& url, 188 const String& url,
189 const Array<Id>& node_ids); 189 const NodeId& root_id);
190 190
191 // Overridden from NodeDelegate: 191 // Overridden from NodeDelegate:
192 virtual void OnNodeDestroyed(const Node* node) OVERRIDE; 192 virtual void OnNodeDestroyed(const Node* node) OVERRIDE;
193 virtual void OnNodeHierarchyChanged(const Node* node, 193 virtual void OnNodeHierarchyChanged(const Node* node,
194 const Node* new_parent, 194 const Node* new_parent,
195 const Node* old_parent) OVERRIDE; 195 const Node* old_parent) OVERRIDE;
196 virtual void OnNodeBoundsChanged(const Node* node, 196 virtual void OnNodeBoundsChanged(const Node* node,
197 const gfx::Rect& old_bounds, 197 const gfx::Rect& old_bounds,
198 const gfx::Rect& new_bounds) OVERRIDE; 198 const gfx::Rect& new_bounds) OVERRIDE;
199 virtual void OnNodeViewReplaced(const Node* node, 199 virtual void OnNodeViewReplaced(const Node* node,
(...skipping 28 matching lines...) Expand all
228 ScopedChange* current_change_; 228 ScopedChange* current_change_;
229 229
230 DISALLOW_COPY_AND_ASSIGN(RootNodeManager); 230 DISALLOW_COPY_AND_ASSIGN(RootNodeManager);
231 }; 231 };
232 232
233 } // namespace service 233 } // namespace service
234 } // namespace view_manager 234 } // namespace view_manager
235 } // namespace mojo 235 } // namespace mojo
236 236
237 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_ 237 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_
OLDNEW
« no previous file with comments | « mojo/services/public/interfaces/view_manager/view_manager.mojom ('k') | mojo/services/view_manager/root_node_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698