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

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

Issue 460863002: Rename Node to View in the View Manager mojom & client lib. Service TBD. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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_VIEW_MANAGER_SERVICE_IMPL_H_ 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_ 6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Adds |node_id| to the set of roots this connection knows about. The caller 123 // Adds |node_id| to the set of roots this connection knows about. The caller
124 // should have verified |node_id| is not among the roots of this connection. 124 // should have verified |node_id| is not among the roots of this connection.
125 void AddRoot(const NodeId& node_id, 125 void AddRoot(const NodeId& node_id,
126 InterfaceRequest<ServiceProvider> service_provider); 126 InterfaceRequest<ServiceProvider> service_provider);
127 127
128 // Removes |node_id| from the set of roots this connection knows about. 128 // Removes |node_id| from the set of roots this connection knows about.
129 void RemoveRoot(const NodeId& node_id); 129 void RemoveRoot(const NodeId& node_id);
130 130
131 void RemoveChildrenAsPartOfEmbed(const NodeId& node_id); 131 void RemoveChildrenAsPartOfEmbed(const NodeId& node_id);
132 132
133 // Converts Node(s) to NodeData(s) for transport. This assumes all the nodes 133 // Converts Node(s) to ViewData(s) for transport. This assumes all the nodes
134 // are valid for the client. The parent of nodes the client is not allowed to 134 // are valid for the client. The parent of nodes the client is not allowed to
135 // see are set to NULL (in the returned NodeData(s)). 135 // see are set to NULL (in the returned ViewData(s)).
136 Array<NodeDataPtr> NodesToNodeDatas(const std::vector<const Node*>& nodes); 136 Array<ViewDataPtr> NodesToViewDatas(const std::vector<const Node*>& nodes);
137 NodeDataPtr NodeToNodeData(const Node* node); 137 ViewDataPtr NodeToViewData(const Node* node);
138 138
139 // Implementation of GetNodeTree(). Adds |node| to |nodes| and recurses if 139 // Implementation of GetNodeTree(). Adds |node| to |nodes| and recurses if
140 // CanDescendIntoNodeForNodeTree() returns true. 140 // CanDescendIntoNodeForNodeTree() returns true.
141 void GetNodeTreeImpl(const Node* node, std::vector<const Node*>* nodes) const; 141 void GetNodeTreeImpl(const Node* node, std::vector<const Node*>* nodes) const;
142 142
143 // ViewManagerService: 143 // ViewManagerService:
144 virtual void CreateNode(Id transport_node_id, 144 virtual void CreateView(Id transport_view_id,
145 const Callback<void(ErrorCode)>& callback) OVERRIDE; 145 const Callback<void(ErrorCode)>& callback) OVERRIDE;
146 virtual void DeleteNode(Id transport_node_id, 146 virtual void DeleteView(Id transport_view_id,
147 const Callback<void(bool)>& callback) OVERRIDE; 147 const Callback<void(bool)>& callback) OVERRIDE;
148 virtual void AddNode(Id parent_id, 148 virtual void AddView(Id parent_id,
149 Id child_id, 149 Id child_id,
150 const Callback<void(bool)>& callback) OVERRIDE; 150 const Callback<void(bool)>& callback) OVERRIDE;
151 virtual void RemoveNodeFromParent( 151 virtual void RemoveViewFromParent(
152 Id node_id, 152 Id node_id,
153 const Callback<void(bool)>& callback) OVERRIDE; 153 const Callback<void(bool)>& callback) OVERRIDE;
154 virtual void ReorderNode(Id node_id, 154 virtual void ReorderView(Id view_id,
155 Id relative_node_id, 155 Id relative_view_id,
156 OrderDirection direction, 156 OrderDirection direction,
157 const Callback<void(bool)>& callback) OVERRIDE; 157 const Callback<void(bool)>& callback) OVERRIDE;
158 virtual void GetNodeTree( 158 virtual void GetViewTree(
159 Id node_id, 159 Id view_id,
160 const Callback<void(Array<NodeDataPtr>)>& callback) OVERRIDE; 160 const Callback<void(Array<ViewDataPtr>)>& callback) OVERRIDE;
161 virtual void SetNodeContents(Id node_id, 161 virtual void SetViewContents(Id view_id,
162 ScopedSharedBufferHandle buffer, 162 ScopedSharedBufferHandle buffer,
163 uint32_t buffer_size, 163 uint32_t buffer_size,
164 const Callback<void(bool)>& callback) OVERRIDE; 164 const Callback<void(bool)>& callback) OVERRIDE;
165 virtual void SetFocus(Id node_id, 165 virtual void SetFocus(Id view_id,
166 const Callback<void(bool)> & callback) OVERRIDE; 166 const Callback<void(bool)> & callback) OVERRIDE;
167 virtual void SetNodeBounds(Id node_id, 167 virtual void SetViewBounds(Id view_id,
168 RectPtr bounds, 168 RectPtr bounds,
169 const Callback<void(bool)>& callback) OVERRIDE; 169 const Callback<void(bool)>& callback) OVERRIDE;
170 virtual void SetNodeVisibility(Id transport_node_id, 170 virtual void SetViewVisibility(Id view_id,
171 bool visible, 171 bool visible,
172 const Callback<void(bool)>& callback) OVERRIDE; 172 const Callback<void(bool)>& callback) OVERRIDE;
173 virtual void Embed(const String& url, 173 virtual void Embed(const String& url,
174 Id transport_node_id, 174 Id view_id,
175 ServiceProviderPtr service_provider, 175 ServiceProviderPtr service_provider,
176 const Callback<void(bool)>& callback) OVERRIDE; 176 const Callback<void(bool)>& callback) OVERRIDE;
177 virtual void DispatchOnNodeInputEvent(Id transport_node_id, 177 virtual void DispatchOnViewInputEvent(Id view_id, EventPtr event) OVERRIDE;
178 EventPtr event) OVERRIDE;
179 178
180 // InterfaceImpl: 179 // InterfaceImpl:
181 virtual void OnConnectionEstablished() MOJO_OVERRIDE; 180 virtual void OnConnectionEstablished() MOJO_OVERRIDE;
182 181
183 // AccessPolicyDelegate: 182 // AccessPolicyDelegate:
184 virtual const base::hash_set<Id>& GetRootsForAccessPolicy() const OVERRIDE; 183 virtual const base::hash_set<Id>& GetRootsForAccessPolicy() const OVERRIDE;
185 virtual bool IsNodeKnownForAccessPolicy(const Node* node) const OVERRIDE; 184 virtual bool IsNodeKnownForAccessPolicy(const Node* node) const OVERRIDE;
186 virtual bool IsNodeRootOfAnotherConnectionForAccessPolicy( 185 virtual bool IsNodeRootOfAnotherConnectionForAccessPolicy(
187 const Node* node) const OVERRIDE; 186 const Node* node) const OVERRIDE;
188 187
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 }; 226 };
228 227
229 #if defined(OS_WIN) 228 #if defined(OS_WIN)
230 #pragma warning(pop) 229 #pragma warning(pop)
231 #endif 230 #endif
232 231
233 } // namespace service 232 } // namespace service
234 } // namespace mojo 233 } // namespace mojo
235 234
236 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_ 235 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/test_change_tracker.cc ('k') | mojo/services/view_manager/view_manager_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698