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_PRIVATE_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_ |
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h" | 9 #include "mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h" |
10 #include "mojo/services/public/cpp/view_manager/view_manager.h" | 10 #include "mojo/services/public/cpp/view_manager/view_manager.h" |
11 | 11 |
12 namespace mojo { | 12 namespace mojo { |
13 namespace services { | 13 namespace services { |
14 namespace view_manager { | 14 namespace view_manager { |
15 | 15 |
16 class ViewManagerSynchronizer; | 16 class ViewManagerSynchronizer; |
17 | 17 |
18 class ViewManagerPrivate { | 18 class ViewManagerPrivate { |
19 public: | 19 public: |
20 explicit ViewManagerPrivate(ViewManager* manager); | 20 explicit ViewManagerPrivate(ViewManager* manager); |
21 ~ViewManagerPrivate(); | 21 ~ViewManagerPrivate(); |
22 | 22 |
23 ViewManagerSynchronizer* synchronizer() { | 23 ViewManagerSynchronizer* synchronizer() { |
24 return manager_->synchronizer_.get(); | 24 return manager_->synchronizer_.get(); |
25 } | 25 } |
26 Shell* shell() { return manager_->shell_; } | 26 Shell* shell() { return manager_->shell_; } |
27 | 27 |
28 void SetRoot(ViewTreeNode* root); | 28 void set_root(ViewTreeNode* root) { manager_->tree_ = root; } |
| 29 |
| 30 void AddNode(TransportNodeId node_id, ViewTreeNode* node); |
| 31 void RemoveNode(TransportNodeId node_id); |
29 | 32 |
30 // Returns true if the ViewManager's synchronizer is connected to the service. | 33 // Returns true if the ViewManager's synchronizer is connected to the service. |
31 bool connected() { return manager_->synchronizer_->connected(); } | 34 bool connected() { return manager_->synchronizer_->connected(); } |
32 | 35 |
33 private: | 36 private: |
34 ViewManager* manager_; | 37 ViewManager* manager_; |
35 | 38 |
36 DISALLOW_COPY_AND_ASSIGN(ViewManagerPrivate); | 39 DISALLOW_COPY_AND_ASSIGN(ViewManagerPrivate); |
37 }; | 40 }; |
38 | 41 |
39 } // namespace view_manager | 42 } // namespace view_manager |
40 } // namespace services | 43 } // namespace services |
41 } // namespace mojo | 44 } // namespace mojo |
42 | 45 |
43 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_ | 46 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_ |
OLD | NEW |