Index: mojo/shell/application_manager.cc |
diff --git a/mojo/shell/application_manager.cc b/mojo/shell/application_manager.cc |
index 314f4ea61b10261d01fd9bb40db07d0480d7d502..3267d5c67639d72616e56b650786212fbf41e41d 100644 |
--- a/mojo/shell/application_manager.cc |
+++ b/mojo/shell/application_manager.cc |
@@ -99,6 +99,21 @@ void ApplicationManager::Connect(scoped_ptr<ConnectParams> params) { |
weak_ptr_factory_.GetWeakPtr(), base::Passed(¶ms))); |
} |
+mojom::ShellClientRequest ApplicationManager::InitInstanceForEmbedder( |
+ const GURL& url) { |
+ DCHECK(!embedder_instance_); |
+ |
+ mojo::shell::Identity target(url, std::string(), mojom::Connector::kUserRoot); |
+ target.SetFilter(GetPermissiveCapabilityFilter()); |
+ DCHECK(!GetApplicationInstance(target)); |
+ |
+ mojom::ShellClientRequest request; |
+ embedder_instance_ = CreateInstance(target, &request); |
+ DCHECK(embedder_instance_); |
+ |
+ return request; |
+} |
+ |
void ApplicationManager::SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, |
const GURL& url) { |
URLToLoaderMap::iterator it = url_to_loader_.find(url); |