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

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

Issue 277563006: Introduces another change id to hierarchy mutations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 7 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_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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Returns the Node with the specified id. 47 // Returns the Node with the specified id.
48 Node* GetNode(const NodeId& id); 48 Node* GetNode(const NodeId& id);
49 49
50 // Returns the View with the specified id. 50 // Returns the View with the specified id.
51 View* GetView(const ViewId& id); 51 View* GetView(const ViewId& id);
52 52
53 // Notifies the client of a hierarchy change. 53 // Notifies the client of a hierarchy change.
54 void NotifyNodeHierarchyChanged(const NodeId& node, 54 void NotifyNodeHierarchyChanged(const NodeId& node,
55 const NodeId& new_parent, 55 const NodeId& new_parent,
56 const NodeId& old_parent, 56 const NodeId& old_parent,
57 TransportChangeId change_id); 57 TransportChangeId server_change_id,
58 TransportChangeId client_change_id);
58 void NotifyNodeViewReplaced(const NodeId& node, 59 void NotifyNodeViewReplaced(const NodeId& node,
59 const ViewId& new_view_id, 60 const ViewId& new_view_id,
60 const ViewId& old_view_id, 61 const ViewId& old_view_id,
61 TransportChangeId change_id); 62 TransportChangeId client_change_id);
62 void NotifyNodeDeleted(const NodeId& node, TransportChangeId change_id); 63 void NotifyNodeDeleted(const NodeId& node,
64 TransportChangeId server_change_id,
65 TransportChangeId client_change_id);
63 66
64 private: 67 private:
65 typedef std::map<TransportConnectionSpecificNodeId, Node*> NodeMap; 68 typedef std::map<TransportConnectionSpecificNodeId, Node*> NodeMap;
66 typedef std::map<TransportConnectionSpecificViewId, View*> ViewMap; 69 typedef std::map<TransportConnectionSpecificViewId, View*> ViewMap;
67 70
68 // Deletes a node owned by this connection. Returns true on success. |source| 71 // Deletes a node owned by this connection. Returns true on success. |source|
69 // is the connection that originated the change. 72 // is the connection that originated the change.
70 bool DeleteNodeImpl(ViewManagerConnection* source, 73 bool DeleteNodeImpl(ViewManagerConnection* source,
71 const NodeId& node_id, 74 const NodeId& node_id,
72 TransportChangeId change_id); 75 TransportChangeId change_id);
(...skipping 11 matching lines...) Expand all
84 87
85 // Overridden from IViewManager: 88 // Overridden from IViewManager:
86 virtual void SetClient(IViewManagerClient* client) OVERRIDE; 89 virtual void SetClient(IViewManagerClient* client) OVERRIDE;
87 virtual void CreateNode(TransportConnectionSpecificNodeId node_id, 90 virtual void CreateNode(TransportConnectionSpecificNodeId node_id,
88 const Callback<void(bool)>& callback) OVERRIDE; 91 const Callback<void(bool)>& callback) OVERRIDE;
89 virtual void DeleteNode(TransportNodeId transport_node_id, 92 virtual void DeleteNode(TransportNodeId transport_node_id,
90 TransportChangeId change_id, 93 TransportChangeId change_id,
91 const Callback<void(bool)>& callback) OVERRIDE; 94 const Callback<void(bool)>& callback) OVERRIDE;
92 virtual void AddNode(TransportNodeId parent_id, 95 virtual void AddNode(TransportNodeId parent_id,
93 TransportNodeId child_id, 96 TransportNodeId child_id,
94 TransportChangeId change_id, 97 TransportChangeId server_change_id,
98 TransportChangeId client_change_id,
95 const Callback<void(bool)>& callback) OVERRIDE; 99 const Callback<void(bool)>& callback) OVERRIDE;
96 virtual void RemoveNodeFromParent( 100 virtual void RemoveNodeFromParent(
97 TransportNodeId node_id, 101 TransportNodeId node_id,
98 TransportChangeId change_id, 102 TransportChangeId server_change_id,
103 TransportChangeId client_change_id,
99 const Callback<void(bool)>& callback) OVERRIDE; 104 const Callback<void(bool)>& callback) OVERRIDE;
100 virtual void GetNodeTree( 105 virtual void GetNodeTree(
101 TransportNodeId node_id, 106 TransportNodeId node_id,
102 const Callback<void(Array<INode>)>& callback) OVERRIDE; 107 const Callback<void(Array<INode>)>& callback) OVERRIDE;
103 virtual void CreateView(TransportConnectionSpecificViewId view_id, 108 virtual void CreateView(TransportConnectionSpecificViewId view_id,
104 const Callback<void(bool)>& callback) OVERRIDE; 109 const Callback<void(bool)>& callback) OVERRIDE;
105 virtual void DeleteView(TransportViewId transport_view_id, 110 virtual void DeleteView(TransportViewId transport_view_id,
106 TransportChangeId change_id, 111 TransportChangeId change_id,
107 const Callback<void(bool)>& callback) OVERRIDE; 112 const Callback<void(bool)>& callback) OVERRIDE;
108 virtual void SetView(TransportNodeId transport_node_id, 113 virtual void SetView(TransportNodeId transport_node_id,
(...skipping 27 matching lines...) Expand all
136 141
137 #if defined(OS_WIN) 142 #if defined(OS_WIN)
138 #pragma warning(pop) 143 #pragma warning(pop)
139 #endif 144 #endif
140 145
141 } // namespace view_manager 146 } // namespace view_manager
142 } // namespace services 147 } // namespace services
143 } // namespace mojo 148 } // namespace mojo
144 149
145 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ 150 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/root_node_manager.cc ('k') | mojo/services/view_manager/view_manager_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698