| 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_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H_ |
| 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 void SetActiveView(TransportNodeId node_id, TransportViewId view_id); | 49 void SetActiveView(TransportNodeId node_id, TransportViewId view_id); |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 friend class ViewManagerTransaction; | 52 friend class ViewManagerTransaction; |
| 53 typedef ScopedVector<ViewManagerTransaction> Transactions; | 53 typedef ScopedVector<ViewManagerTransaction> Transactions; |
| 54 | 54 |
| 55 // Overridden from IViewManagerClient: | 55 // Overridden from IViewManagerClient: |
| 56 virtual void OnConnectionEstablished( | 56 virtual void OnConnectionEstablished( |
| 57 TransportConnectionId connection_id, | 57 TransportConnectionId connection_id, |
| 58 TransportChangeId next_server_change_id, | 58 TransportChangeId next_server_change_id, |
| 59 const mojo::Array<INode>& nodes) OVERRIDE; | 59 mojo::Array<INodePtr> nodes) OVERRIDE; |
| 60 virtual void OnServerChangeIdAdvanced( | 60 virtual void OnServerChangeIdAdvanced( |
| 61 uint32_t next_server_change_id) OVERRIDE; | 61 uint32_t next_server_change_id) OVERRIDE; |
| 62 virtual void OnNodeHierarchyChanged( | 62 virtual void OnNodeHierarchyChanged( |
| 63 uint32 node_id, | 63 uint32 node_id, |
| 64 uint32 new_parent_id, | 64 uint32 new_parent_id, |
| 65 uint32 old_parent_id, | 65 uint32 old_parent_id, |
| 66 TransportChangeId server_change_id, | 66 TransportChangeId server_change_id, |
| 67 const mojo::Array<INode>& nodes) OVERRIDE; | 67 mojo::Array<INodePtr> nodes) OVERRIDE; |
| 68 virtual void OnNodeDeleted(TransportNodeId node_id, | 68 virtual void OnNodeDeleted(TransportNodeId node_id, |
| 69 TransportChangeId server_change_id) OVERRIDE; | 69 TransportChangeId server_change_id) OVERRIDE; |
| 70 virtual void OnNodeViewReplaced(uint32_t node, | 70 virtual void OnNodeViewReplaced(uint32_t node, |
| 71 uint32_t new_view_id, | 71 uint32_t new_view_id, |
| 72 uint32_t old_view_id) OVERRIDE; | 72 uint32_t old_view_id) OVERRIDE; |
| 73 virtual void OnViewDeleted(uint32_t view_id) OVERRIDE; | 73 virtual void OnViewDeleted(uint32_t view_id) OVERRIDE; |
| 74 | 74 |
| 75 // Sync the client model with the service by enumerating the pending | 75 // Sync the client model with the service by enumerating the pending |
| 76 // transaction queue and applying them in order. | 76 // transaction queue and applying them in order. |
| 77 void Sync(); | 77 void Sync(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 96 | 96 |
| 97 IViewManagerPtr service_; | 97 IViewManagerPtr service_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(ViewManagerSynchronizer); | 99 DISALLOW_COPY_AND_ASSIGN(ViewManagerSynchronizer); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace view_manager | 102 } // namespace view_manager |
| 103 } // namespace mojo | 103 } // namespace mojo |
| 104 | 104 |
| 105 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H
_ | 105 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H
_ |
| OLD | NEW |