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_VIEW_MANAGER_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ |
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "mojo/services/public/cpp/view_manager/view_manager_types.h" | 11 #include "mojo/services/public/cpp/view_manager/types.h" |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 class Application; | 14 class Application; |
15 namespace view_manager { | 15 namespace view_manager { |
16 | 16 |
| 17 class Node; |
17 class View; | 18 class View; |
18 class ViewManagerDelegate; | 19 class ViewManagerDelegate; |
19 class ViewTreeNode; | |
20 | 20 |
21 class ViewManager { | 21 class ViewManager { |
22 public: | 22 public: |
23 // Delegate is owned by the caller. | 23 // Delegate is owned by the caller. |
24 static void Create(Application* application, ViewManagerDelegate* delegate); | 24 static void Create(Application* application, ViewManagerDelegate* delegate); |
25 | 25 |
26 // Returns the URL of the application that embedded this application. | 26 // Returns the URL of the application that embedded this application. |
27 virtual const std::string& GetEmbedderURL() const = 0; | 27 virtual const std::string& GetEmbedderURL() const = 0; |
28 | 28 |
29 // Returns all root nodes known to this connection. | 29 // Returns all root nodes known to this connection. |
30 virtual const std::vector<ViewTreeNode*>& GetRoots() const = 0; | 30 virtual const std::vector<Node*>& GetRoots() const = 0; |
31 | 31 |
32 // Returns a Node or View known to this connection. | 32 // Returns a Node or View known to this connection. |
33 virtual ViewTreeNode* GetNodeById(Id id) = 0; | 33 virtual Node* GetNodeById(Id id) = 0; |
34 virtual View* GetViewById(Id id) = 0; | 34 virtual View* GetViewById(Id id) = 0; |
35 | 35 |
36 protected: | 36 protected: |
37 virtual ~ViewManager() {} | 37 virtual ~ViewManager() {} |
38 | 38 |
39 }; | 39 }; |
40 | 40 |
41 } // namespace view_manager | 41 } // namespace view_manager |
42 } // namespace mojo | 42 } // namespace mojo |
43 | 43 |
44 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ | 44 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ |
OLD | NEW |