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" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" | 12 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" |
| 13 #include "mojo/services/public/cpp/view_manager/view_manager.h" |
13 #include "mojo/services/public/cpp/view_manager/view_manager_types.h" | 14 #include "mojo/services/public/cpp/view_manager/view_manager_types.h" |
14 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" | 15 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" |
15 | 16 |
16 class SkBitmap; | 17 class SkBitmap; |
17 | 18 |
18 namespace mojo { | 19 namespace mojo { |
19 namespace view_manager { | 20 namespace view_manager { |
20 | 21 |
21 class ViewManager; | 22 class ViewManager; |
22 class ViewManagerTransaction; | 23 class ViewManagerTransaction; |
23 | 24 |
24 // Manages the connection with the View Manager service. | 25 // Manages the connection with the View Manager service. |
25 class ViewManagerSynchronizer : public InterfaceImpl<IViewManagerClient> { | 26 class ViewManagerSynchronizer : public InterfaceImpl<IViewManagerClient> { |
26 public: | 27 public: |
27 explicit ViewManagerSynchronizer(ViewManager* view_manager); | 28 explicit ViewManagerSynchronizer(ViewManagerDelegate* delegate); |
28 virtual ~ViewManagerSynchronizer(); | 29 virtual ~ViewManagerSynchronizer(); |
29 | 30 |
30 bool connected() const { return connected_; } | 31 bool connected() const { return connected_; } |
| 32 TransportConnectionId connection_id() const { return connection_id_; } |
31 | 33 |
32 // API exposed to the node/view implementations that pushes local changes to | 34 // API exposed to the node/view implementations that pushes local changes to |
33 // the service. | 35 // the service. |
34 TransportNodeId CreateViewTreeNode(); | 36 TransportNodeId CreateViewTreeNode(); |
35 void DestroyViewTreeNode(TransportNodeId node_id); | 37 void DestroyViewTreeNode(TransportNodeId node_id); |
36 | 38 |
37 TransportViewId CreateView(); | 39 TransportViewId CreateView(); |
38 void DestroyView(TransportViewId view_id); | 40 void DestroyView(TransportViewId view_id); |
39 | 41 |
40 // These methods take TransportIds. For views owned by the current connection, | 42 // These methods take TransportIds. For views owned by the current connection, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 119 |
118 IViewManager* service_; | 120 IViewManager* service_; |
119 | 121 |
120 DISALLOW_COPY_AND_ASSIGN(ViewManagerSynchronizer); | 122 DISALLOW_COPY_AND_ASSIGN(ViewManagerSynchronizer); |
121 }; | 123 }; |
122 | 124 |
123 } // namespace view_manager | 125 } // namespace view_manager |
124 } // namespace mojo | 126 } // namespace mojo |
125 | 127 |
126 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H
_ | 128 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H
_ |
OLD | NEW |