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

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

Issue 328873002: Renames view manager Connect methods to Embed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mispelling Created 6 years, 6 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 Id next_server_change_id() const { 88 Id next_server_change_id() const {
89 return next_server_change_id_; 89 return next_server_change_id_;
90 } 90 }
91 91
92 void AddConnection(ViewManagerConnection* connection); 92 void AddConnection(ViewManagerConnection* connection);
93 void RemoveConnection(ViewManagerConnection* connection); 93 void RemoveConnection(ViewManagerConnection* connection);
94 94
95 // Establishes the initial client. Similar to Connect(), but the resulting 95 // Establishes the initial client. Similar to Connect(), but the resulting
96 // client is allowed to do anything. 96 // client is allowed to do anything.
97 void InitialConnect(const std::string& url); 97 void EmbedRoot(const std::string& url);
98 98
99 // See description of IViewManager::Connect() for details. This assumes 99 // See description of IViewManager::Embed() for details. This assumes
100 // |node_ids| has been validated. 100 // |node_ids| has been validated.
101 void Connect(ConnectionSpecificId creator_id, 101 void Embed(ConnectionSpecificId creator_id,
102 const String& url, 102 const String& url,
103 const Array<Id>& node_ids); 103 const Array<Id>& node_ids);
104 104
105 // Returns the connection by id. 105 // Returns the connection by id.
106 ViewManagerConnection* GetConnection(ConnectionSpecificId connection_id); 106 ViewManagerConnection* GetConnection(ConnectionSpecificId connection_id);
107 107
108 // Returns the Node identified by |id|. 108 // Returns the Node identified by |id|.
109 Node* GetNode(const NodeId& id); 109 Node* GetNode(const NodeId& id);
110 110
111 // Returns the View identified by |id|. 111 // Returns the View identified by |id|.
112 View* GetView(const ViewId& id); 112 View* GetView(const ViewId& id);
113 113
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void PrepareForChange(ScopedChange* change); 161 void PrepareForChange(ScopedChange* change);
162 162
163 // Balances a call to PrepareForChange(). 163 // Balances a call to PrepareForChange().
164 void FinishChange(); 164 void FinishChange();
165 165
166 // Returns true if the specified connection originated the current change. 166 // Returns true if the specified connection originated the current change.
167 bool IsChangeSource(ConnectionSpecificId connection_id) const { 167 bool IsChangeSource(ConnectionSpecificId connection_id) const {
168 return current_change_ && current_change_->connection_id() == connection_id; 168 return current_change_ && current_change_->connection_id() == connection_id;
169 } 169 }
170 170
171 // Implementation of the two connect variants. 171 // Implementation of the two embed variants.
172 ViewManagerConnection* ConnectImpl(ConnectionSpecificId creator_id, 172 ViewManagerConnection* EmbedImpl(ConnectionSpecificId creator_id,
173 const String& url, 173 const String& url,
174 const Array<Id>& node_ids); 174 const Array<Id>& node_ids);
175 175
176 // Overridden from NodeDelegate: 176 // Overridden from NodeDelegate:
177 virtual void OnNodeHierarchyChanged(const Node* node, 177 virtual void OnNodeHierarchyChanged(const Node* node,
178 const Node* new_parent, 178 const Node* new_parent,
179 const Node* old_parent) OVERRIDE; 179 const Node* old_parent) OVERRIDE;
180 virtual void OnNodeViewReplaced(const Node* node, 180 virtual void OnNodeViewReplaced(const Node* node,
181 const View* new_view, 181 const View* new_view,
182 const View* old_view) OVERRIDE; 182 const View* old_view) OVERRIDE;
183 virtual void OnViewInputEvent(const View* view, 183 virtual void OnViewInputEvent(const View* view,
184 const ui::Event* event) OVERRIDE; 184 const ui::Event* event) OVERRIDE;
(...skipping 24 matching lines...) Expand all
209 ScopedChange* current_change_; 209 ScopedChange* current_change_;
210 210
211 DISALLOW_COPY_AND_ASSIGN(RootNodeManager); 211 DISALLOW_COPY_AND_ASSIGN(RootNodeManager);
212 }; 212 };
213 213
214 } // namespace service 214 } // namespace service
215 } // namespace view_manager 215 } // namespace view_manager
216 } // namespace mojo 216 } // namespace mojo
217 217
218 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_ 218 #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