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 view_manager { | 13 namespace view_manager { |
14 | 14 |
15 class ViewManagerSynchronizer; | 15 class ViewManagerSynchronizer; |
16 | 16 |
17 class ViewManagerPrivate { | 17 class ViewManagerPrivate { |
18 public: | 18 public: |
19 explicit ViewManagerPrivate(ViewManager* manager); | 19 explicit ViewManagerPrivate(ViewManager* manager); |
20 ~ViewManagerPrivate(); | 20 ~ViewManagerPrivate(); |
21 | 21 |
22 ViewManagerSynchronizer* synchronizer() { | 22 ViewManagerSynchronizer* synchronizer() { |
23 return manager_->synchronizer_.get(); | 23 return manager_->synchronizer_.get(); |
24 } | 24 } |
25 Shell* shell() { return manager_->shell_; } | 25 ServiceProvider* service_provider() { return manager_->service_provider_; } |
26 | 26 |
27 void set_root(ViewTreeNode* root) { manager_->tree_ = root; } | 27 void set_root(ViewTreeNode* root) { manager_->tree_ = root; } |
28 | 28 |
29 void AddNode(TransportNodeId node_id, ViewTreeNode* node); | 29 void AddNode(TransportNodeId node_id, ViewTreeNode* node); |
30 void RemoveNode(TransportNodeId node_id); | 30 void RemoveNode(TransportNodeId node_id); |
31 | 31 |
32 void AddView(TransportViewId view_id, View* view); | 32 void AddView(TransportViewId view_id, View* view); |
33 void RemoveView(TransportViewId view_id); | 33 void RemoveView(TransportViewId view_id); |
34 | 34 |
35 // Returns true if the ViewManager's synchronizer is connected to the service. | 35 // Returns true if the ViewManager's synchronizer is connected to the service. |
36 bool connected() { return manager_->synchronizer_->connected(); } | 36 bool connected() { return manager_->synchronizer_->connected(); } |
37 | 37 |
38 private: | 38 private: |
39 ViewManager* manager_; | 39 ViewManager* manager_; |
40 | 40 |
41 DISALLOW_COPY_AND_ASSIGN(ViewManagerPrivate); | 41 DISALLOW_COPY_AND_ASSIGN(ViewManagerPrivate); |
42 }; | 42 }; |
43 | 43 |
44 } // namespace view_manager | 44 } // namespace view_manager |
45 } // namespace mojo | 45 } // namespace mojo |
46 | 46 |
47 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_ | 47 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_ |
OLD | NEW |