| 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/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 uint32 new_parent_id, | 81 uint32 new_parent_id, |
| 82 uint32 old_parent_id, | 82 uint32 old_parent_id, |
| 83 TransportChangeId server_change_id, | 83 TransportChangeId server_change_id, |
| 84 mojo::Array<INodePtr> nodes) OVERRIDE; | 84 mojo::Array<INodePtr> nodes) OVERRIDE; |
| 85 virtual void OnNodeDeleted(TransportNodeId node_id, | 85 virtual void OnNodeDeleted(TransportNodeId node_id, |
| 86 TransportChangeId server_change_id) OVERRIDE; | 86 TransportChangeId server_change_id) OVERRIDE; |
| 87 virtual void OnNodeViewReplaced(uint32_t node, | 87 virtual void OnNodeViewReplaced(uint32_t node, |
| 88 uint32_t new_view_id, | 88 uint32_t new_view_id, |
| 89 uint32_t old_view_id) OVERRIDE; | 89 uint32_t old_view_id) OVERRIDE; |
| 90 virtual void OnViewDeleted(uint32_t view_id) OVERRIDE; | 90 virtual void OnViewDeleted(uint32_t view_id) OVERRIDE; |
| 91 virtual void OnViewInputEvent(uint32_t view, |
| 92 EventPtr event, |
| 93 const Callback<void()>& callback) OVERRIDE; |
| 91 | 94 |
| 92 // Sync the client model with the service by enumerating the pending | 95 // Sync the client model with the service by enumerating the pending |
| 93 // transaction queue and applying them in order. | 96 // transaction queue and applying them in order. |
| 94 void Sync(); | 97 void Sync(); |
| 95 | 98 |
| 96 // Removes |transaction| from the pending queue. |transaction| must be at the | 99 // Removes |transaction| from the pending queue. |transaction| must be at the |
| 97 // front of the queue. | 100 // front of the queue. |
| 98 void RemoveFromPendingQueue(ViewManagerTransaction* transaction); | 101 void RemoveFromPendingQueue(ViewManagerTransaction* transaction); |
| 99 | 102 |
| 100 ViewManager* view_manager() { return view_manager_.get(); } | 103 ViewManager* view_manager() { return view_manager_.get(); } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 113 | 116 |
| 114 IViewManager* service_; | 117 IViewManager* service_; |
| 115 | 118 |
| 116 DISALLOW_COPY_AND_ASSIGN(ViewManagerSynchronizer); | 119 DISALLOW_COPY_AND_ASSIGN(ViewManagerSynchronizer); |
| 117 }; | 120 }; |
| 118 | 121 |
| 119 } // namespace view_manager | 122 } // namespace view_manager |
| 120 } // namespace mojo | 123 } // namespace mojo |
| 121 | 124 |
| 122 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H
_ | 125 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H
_ |
| OLD | NEW |