OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ | |
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "mojo/services/public/cpp/view_manager/types.h" | |
12 | |
13 namespace mojo { | |
14 class View; | |
15 | |
16 // Encapsulates a connection to the view manager service. | |
17 // A unique connection is made for every unique embed path for an app. e.g. for | |
18 // app B embed by the following paths: A->B, A->C->B - there are two connections | |
19 // and thus two instances of this class. | |
20 class ViewManager { | |
21 public: | |
22 // Returns the URL of the application that embedded this application. | |
23 virtual const std::string& GetEmbedderURL() const = 0; | |
24 | |
25 // Returns all root views known to this connection. | |
26 virtual const std::vector<View*>& GetRoots() const = 0; | |
27 | |
28 // Returns a View known to this connection. | |
29 virtual View* GetViewById(Id id) = 0; | |
30 | |
31 protected: | |
32 virtual ~ViewManager() {} | |
33 }; | |
34 | |
35 } // namespace mojo | |
36 | |
37 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ | |
OLD | NEW |