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/geometry/geometry_type_converters.h" | 12 #include "mojo/geometry/geometry_type_converters.h" |
13 #include "mojo/services/public/cpp/view_manager/view_manager_types.h" | 13 #include "mojo/services/public/cpp/view_manager/view_manager_types.h" |
14 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" | 14 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" |
15 | 15 |
| 16 class SkBitmap; |
| 17 |
16 namespace base { | 18 namespace base { |
17 class RunLoop; | 19 class RunLoop; |
18 } | 20 } |
19 | 21 |
20 namespace mojo { | 22 namespace mojo { |
21 namespace view_manager { | 23 namespace view_manager { |
22 | 24 |
23 class ViewManager; | 25 class ViewManager; |
24 class ViewManagerTransaction; | 26 class ViewManagerTransaction; |
25 | 27 |
(...skipping 17 matching lines...) Expand all Loading... |
43 // the connection id high word can be zero. In all cases, the TransportId 0x1 | 45 // the connection id high word can be zero. In all cases, the TransportId 0x1 |
44 // refers to the root node. | 46 // refers to the root node. |
45 void AddChild(TransportNodeId child_id, TransportNodeId parent_id); | 47 void AddChild(TransportNodeId child_id, TransportNodeId parent_id); |
46 void RemoveChild(TransportNodeId child_id, TransportNodeId parent_id); | 48 void RemoveChild(TransportNodeId child_id, TransportNodeId parent_id); |
47 | 49 |
48 bool OwnsNode(TransportNodeId id) const; | 50 bool OwnsNode(TransportNodeId id) const; |
49 bool OwnsView(TransportViewId id) const; | 51 bool OwnsView(TransportViewId id) const; |
50 | 52 |
51 void SetActiveView(TransportNodeId node_id, TransportViewId view_id); | 53 void SetActiveView(TransportNodeId node_id, TransportViewId view_id); |
52 void SetBounds(TransportNodeId node_id, const gfx::Rect& bounds); | 54 void SetBounds(TransportNodeId node_id, const gfx::Rect& bounds); |
| 55 void SetViewContents(TransportViewId view_id, const SkBitmap& contents); |
53 | 56 |
54 void set_changes_acked_callback(const base::Callback<void(void)>& callback) { | 57 void set_changes_acked_callback(const base::Callback<void(void)>& callback) { |
55 changes_acked_callback_ = callback; | 58 changes_acked_callback_ = callback; |
56 } | 59 } |
57 void ClearChangesAckedCallback() { | 60 void ClearChangesAckedCallback() { |
58 changes_acked_callback_ = base::Callback<void(void)>(); | 61 changes_acked_callback_ = base::Callback<void(void)>(); |
59 } | 62 } |
60 | 63 |
61 private: | 64 private: |
62 friend class ViewManagerTransaction; | 65 friend class ViewManagerTransaction; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 114 |
112 IViewManagerPtr service_; | 115 IViewManagerPtr service_; |
113 | 116 |
114 DISALLOW_COPY_AND_ASSIGN(ViewManagerSynchronizer); | 117 DISALLOW_COPY_AND_ASSIGN(ViewManagerSynchronizer); |
115 }; | 118 }; |
116 | 119 |
117 } // namespace view_manager | 120 } // namespace view_manager |
118 } // namespace mojo | 121 } // namespace mojo |
119 | 122 |
120 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H
_ | 123 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H
_ |
OLD | NEW |