Index: mojo/services/view_manager/view_manager_init_service_context.h |
diff --git a/mojo/services/view_manager/view_manager_init_service_context.h b/mojo/services/view_manager/view_manager_init_service_context.h |
index 3e02069905e2d33f60324f4c33d8e9bfc417b168..6b45ef3f06c953f550379a861c5f165891f03d9e 100644 |
--- a/mojo/services/view_manager/view_manager_init_service_context.h |
+++ b/mojo/services/view_manager/view_manager_init_service_context.h |
@@ -8,6 +8,7 @@ |
#include <set> |
#include "base/memory/scoped_ptr.h" |
+#include "base/memory/scoped_vector.h" |
#include "mojo/public/cpp/application/application_connection.h" |
#include "mojo/public/cpp/application/application_delegate.h" |
#include "mojo/services/view_manager/root_view_manager_delegate.h" |
@@ -31,6 +32,10 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerInitServiceContext |
void ConfigureIncomingConnection(ApplicationConnection* connection); |
+ void Embed(const String& url, |
+ ServiceProviderPtr service_provider, |
+ const Callback<void(bool)>& callback); |
+ |
RootNodeManager* root_node_manager() { return root_node_manager_.get(); } |
bool is_tree_host_ready() const { return is_tree_host_ready_; } |
@@ -38,16 +43,33 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerInitServiceContext |
private: |
typedef std::vector<ViewManagerInitServiceImpl*> Connections; |
+ struct ConnectParams { |
+ ConnectParams(); |
+ ~ConnectParams(); |
+ |
+ std::string url; |
+ InterfaceRequest<ServiceProvider> service_provider; |
+ Callback<void(bool)> callback; |
+ }; |
+ |
// RootViewManagerDelegate overrides: |
virtual void OnRootViewManagerWindowTreeHostCreated() OVERRIDE; |
void OnNativeViewportDeleted(); |
+ void MaybeEmbed(); |
+ |
scoped_ptr<RootNodeManager> root_node_manager_; |
Connections connections_; |
+ // Stores information about inbound calls to Embed() pending execution on |
+ // the window tree host being ready to use. |
+ ScopedVector<ConnectParams> connect_params_; |
+ |
bool is_tree_host_ready_; |
+ bool deleting_connection_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ViewManagerInitServiceContext); |
}; |