Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Unified Diff: mojo/services/view_manager/view_manager_init_service_context.h

Issue 463523003: Fix an issue with view manager init service where you had to retain a connection to the init servic… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/examples/wm_flow/app/app.cc ('k') | mojo/services/view_manager/view_manager_init_service_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « mojo/examples/wm_flow/app/app.cc ('k') | mojo/services/view_manager/view_manager_init_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698