| OLD | NEW |
| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // The following methods are invoked after the corresponding change has been | 77 // The following methods are invoked after the corresponding change has been |
| 78 // processed. They do the appropriate bookkeeping and update the client as | 78 // processed. They do the appropriate bookkeeping and update the client as |
| 79 // necessary. | 79 // necessary. |
| 80 void ProcessNodeBoundsChanged(const Node* node, | 80 void ProcessNodeBoundsChanged(const Node* node, |
| 81 const gfx::Rect& old_bounds, | 81 const gfx::Rect& old_bounds, |
| 82 const gfx::Rect& new_bounds, | 82 const gfx::Rect& new_bounds, |
| 83 bool originated_change); | 83 bool originated_change); |
| 84 void ProcessNodeHierarchyChanged(const Node* node, | 84 void ProcessNodeHierarchyChanged(const Node* node, |
| 85 const Node* new_parent, | 85 const Node* new_parent, |
| 86 const Node* old_parent, | 86 const Node* old_parent, |
| 87 Id server_change_id, | |
| 88 bool originated_change); | 87 bool originated_change); |
| 89 void ProcessNodeReorder(const Node* node, | 88 void ProcessNodeReorder(const Node* node, |
| 90 const Node* relative_node, | 89 const Node* relative_node, |
| 91 OrderDirection direction, | 90 OrderDirection direction, |
| 92 Id server_change_id, | |
| 93 bool originated_change); | 91 bool originated_change); |
| 94 void ProcessNodeViewReplaced(const Node* node, | 92 void ProcessNodeViewReplaced(const Node* node, |
| 95 const View* new_view, | 93 const View* new_view, |
| 96 const View* old_view, | 94 const View* old_view, |
| 97 bool originated_change); | 95 bool originated_change); |
| 98 void ProcessNodeDeleted(const NodeId& node, | 96 void ProcessNodeDeleted(const NodeId& node, bool originated_change); |
| 99 Id server_change_id, | |
| 100 bool originated_change); | |
| 101 void ProcessViewDeleted(const ViewId& view, bool originated_change); | 97 void ProcessViewDeleted(const ViewId& view, bool originated_change); |
| 102 void ProcessFocusChanged(const Node* focused_node, | 98 void ProcessFocusChanged(const Node* focused_node, |
| 103 const Node* blurred_node, | 99 const Node* blurred_node, |
| 104 bool originated_change); | 100 bool originated_change); |
| 105 | 101 |
| 106 // TODO(sky): move this to private section (currently can't because of | 102 // TODO(sky): move this to private section (currently can't because of |
| 107 // bindings). | 103 // bindings). |
| 108 // InterfaceImp overrides: | 104 // InterfaceImp overrides: |
| 109 virtual void OnConnectionError() MOJO_OVERRIDE; | 105 virtual void OnConnectionError() MOJO_OVERRIDE; |
| 110 | 106 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 165 |
| 170 // Converts an array of Nodes to NodeDatas. This assumes all the nodes are | 166 // Converts an array of Nodes to NodeDatas. This assumes all the nodes are |
| 171 // valid for the client. The parent of nodes the client is not allowed to see | 167 // valid for the client. The parent of nodes the client is not allowed to see |
| 172 // are set to NULL (in the returned NodeDatas). | 168 // are set to NULL (in the returned NodeDatas). |
| 173 Array<NodeDataPtr> NodesToNodeDatas(const std::vector<const Node*>& nodes); | 169 Array<NodeDataPtr> NodesToNodeDatas(const std::vector<const Node*>& nodes); |
| 174 | 170 |
| 175 // ViewManagerService: | 171 // ViewManagerService: |
| 176 virtual void CreateNode(Id transport_node_id, | 172 virtual void CreateNode(Id transport_node_id, |
| 177 const Callback<void(ErrorCode)>& callback) OVERRIDE; | 173 const Callback<void(ErrorCode)>& callback) OVERRIDE; |
| 178 virtual void DeleteNode(Id transport_node_id, | 174 virtual void DeleteNode(Id transport_node_id, |
| 179 Id server_change_id, | |
| 180 const Callback<void(bool)>& callback) OVERRIDE; | 175 const Callback<void(bool)>& callback) OVERRIDE; |
| 181 virtual void AddNode(Id parent_id, | 176 virtual void AddNode(Id parent_id, |
| 182 Id child_id, | 177 Id child_id, |
| 183 Id server_change_id, | |
| 184 const Callback<void(bool)>& callback) OVERRIDE; | 178 const Callback<void(bool)>& callback) OVERRIDE; |
| 185 virtual void RemoveNodeFromParent( | 179 virtual void RemoveNodeFromParent( |
| 186 Id node_id, | 180 Id node_id, |
| 187 Id server_change_id, | |
| 188 const Callback<void(bool)>& callback) OVERRIDE; | 181 const Callback<void(bool)>& callback) OVERRIDE; |
| 189 virtual void ReorderNode(Id node_id, | 182 virtual void ReorderNode(Id node_id, |
| 190 Id relative_node_id, | 183 Id relative_node_id, |
| 191 OrderDirection direction, | 184 OrderDirection direction, |
| 192 Id server_change_id, | |
| 193 const Callback<void(bool)>& callback) OVERRIDE; | 185 const Callback<void(bool)>& callback) OVERRIDE; |
| 194 virtual void GetNodeTree( | 186 virtual void GetNodeTree( |
| 195 Id node_id, | 187 Id node_id, |
| 196 const Callback<void(Array<NodeDataPtr>)>& callback) OVERRIDE; | 188 const Callback<void(Array<NodeDataPtr>)>& callback) OVERRIDE; |
| 197 virtual void CreateView(Id transport_view_id, | 189 virtual void CreateView(Id transport_view_id, |
| 198 const Callback<void(bool)>& callback) OVERRIDE; | 190 const Callback<void(bool)>& callback) OVERRIDE; |
| 199 virtual void DeleteView(Id transport_view_id, | 191 virtual void DeleteView(Id transport_view_id, |
| 200 const Callback<void(bool)>& callback) OVERRIDE; | 192 const Callback<void(bool)>& callback) OVERRIDE; |
| 201 virtual void SetView(Id transport_node_id, | 193 virtual void SetView(Id transport_node_id, |
| 202 Id transport_view_id, | 194 Id transport_view_id, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 253 |
| 262 #if defined(OS_WIN) | 254 #if defined(OS_WIN) |
| 263 #pragma warning(pop) | 255 #pragma warning(pop) |
| 264 #endif | 256 #endif |
| 265 | 257 |
| 266 } // namespace service | 258 } // namespace service |
| 267 } // namespace view_manager | 259 } // namespace view_manager |
| 268 } // namespace mojo | 260 } // namespace mojo |
| 269 | 261 |
| 270 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_ | 262 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_ |
| OLD | NEW |