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

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

Issue 272833002: View synchronization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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
« no previous file with comments | « mojo/services/view_manager/node.cc ('k') | mojo/services/view_manager/root_node_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void AddConnection(ViewManagerConnection* connection); 65 void AddConnection(ViewManagerConnection* connection);
66 void RemoveConnection(ViewManagerConnection* connection); 66 void RemoveConnection(ViewManagerConnection* connection);
67 67
68 // Returns the connection by id. 68 // Returns the connection by id.
69 ViewManagerConnection* GetConnection(TransportConnectionId connection_id); 69 ViewManagerConnection* GetConnection(TransportConnectionId connection_id);
70 70
71 // Returns the Node identified by |id|. 71 // Returns the Node identified by |id|.
72 Node* GetNode(const NodeId& id); 72 Node* GetNode(const NodeId& id);
73 73
74 // Returns the View identified by |id|. 74 // Returns the View identified by |id|.
75 View* GetView(const ViewId& id); 75 service::View* GetView(const ViewId& id);
76 76
77 Node* root() { return &root_; } 77 Node* root() { return &root_; }
78 78
79 // These functions trivially delegate to all ViewManagerConnections, which in 79 // These functions trivially delegate to all ViewManagerConnections, which in
80 // term notify their clients. 80 // term notify their clients.
81 void NotifyNodeHierarchyChanged(const NodeId& node, 81 void NotifyNodeHierarchyChanged(const NodeId& node,
82 const NodeId& new_parent, 82 const NodeId& new_parent,
83 const NodeId& old_parent); 83 const NodeId& old_parent);
84 void NotifyNodeViewReplaced(const NodeId& node, 84 void NotifyNodeViewReplaced(const NodeId& node,
85 const ViewId& new_view_id, 85 const ViewId& new_view_id,
86 const ViewId& old_view_id); 86 const ViewId& old_view_id);
87 void NotifyNodeDeleted(const NodeId& node); 87 void NotifyNodeDeleted(const NodeId& node);
88 void NotifyViewDeleted(const ViewId& view);
88 89
89 private: 90 private:
90 // Used to setup any static state needed by RootNodeManager. 91 // Used to setup any static state needed by RootNodeManager.
91 struct Context { 92 struct Context {
92 Context(); 93 Context();
93 ~Context(); 94 ~Context();
94 }; 95 };
95 96
96 // Tracks a change. 97 // Tracks a change.
97 struct Change { 98 struct Change {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 Node root_; 150 Node root_;
150 151
151 DISALLOW_COPY_AND_ASSIGN(RootNodeManager); 152 DISALLOW_COPY_AND_ASSIGN(RootNodeManager);
152 }; 153 };
153 154
154 } // namespace view_manager 155 } // namespace view_manager
155 } // namespace services 156 } // namespace services
156 } // namespace mojo 157 } // namespace mojo
157 158
158 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_ 159 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/node.cc ('k') | mojo/services/view_manager/root_node_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698