| 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/types.h" | 11 #include "mojo/services/public/cpp/view_manager/types.h" |
| 12 #include "mojo/services/public/interfaces/input_events/input_events.mojom.h" | 12 #include "mojo/services/public/interfaces/input_events/input_events.mojom.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 class ApplicationConnection; | |
| 16 class View; | 15 class View; |
| 17 class ViewManagerDelegate; | 16 class ViewManagerDelegate; |
| 18 class WindowManagerDelegate; | 17 class WindowManagerDelegate; |
| 19 | 18 |
| 20 // Encapsulates a connection to the view manager service. | 19 // Encapsulates a connection to the view manager service. |
| 21 // A unique connection is made for every unique embed path for an app. e.g. for | 20 // A unique connection is made for every unique embed path for an app. e.g. for |
| 22 // app B embed by the following paths: A->B, A->C->B - there are two connections | 21 // app B embed by the following paths: A->B, A->C->B - there are two connections |
| 23 // and thus two instances of this class. | 22 // and thus two instances of this class. |
| 24 class ViewManager { | 23 class ViewManager { |
| 25 public: | 24 public: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 36 virtual const std::string& GetEmbedderURL() const = 0; | 35 virtual const std::string& GetEmbedderURL() const = 0; |
| 37 | 36 |
| 38 // Returns all root views known to this connection. | 37 // Returns all root views known to this connection. |
| 39 virtual const std::vector<View*>& GetRoots() const = 0; | 38 virtual const std::vector<View*>& GetRoots() const = 0; |
| 40 | 39 |
| 41 // Returns a View known to this connection. | 40 // Returns a View known to this connection. |
| 42 virtual View* GetViewById(Id id) = 0; | 41 virtual View* GetViewById(Id id) = 0; |
| 43 | 42 |
| 44 protected: | 43 protected: |
| 45 virtual ~ViewManager() {} | 44 virtual ~ViewManager() {} |
| 46 | |
| 47 }; | 45 }; |
| 48 | 46 |
| 49 } // namespace mojo | 47 } // namespace mojo |
| 50 | 48 |
| 51 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ | 49 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ |
| OLD | NEW |