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

Unified Diff: mojo/service_manager/background_shell_service_loader.cc

Issue 423963004: First cut at "content handling" support in Mojo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blech 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
Index: mojo/service_manager/background_shell_service_loader.cc
diff --git a/mojo/service_manager/background_shell_service_loader.cc b/mojo/service_manager/background_shell_service_loader.cc
index 6d7a2582108628a29c9a728b9be3886ffe978b46..eab472769c22e71187b07e0793fa3dbe625a304f 100644
--- a/mojo/service_manager/background_shell_service_loader.cc
+++ b/mojo/service_manager/background_shell_service_loader.cc
@@ -18,7 +18,9 @@ class BackgroundShellServiceLoader::BackgroundLoader {
void LoadService(ServiceManager* manager,
const GURL& url,
ScopedMessagePipeHandle shell_handle) {
- loader_->LoadService(manager, url, shell_handle.Pass());
+ scoped_refptr<LoadServiceCallbacks> callbacks(
+ new ServiceLoader::SimpleLoadServiceCallbacks(shell_handle.Pass()));
+ loader_->LoadService(manager, url, callbacks);
}
void OnServiceError(ServiceManager* manager, const GURL& url) {
@@ -54,7 +56,11 @@ BackgroundShellServiceLoader::~BackgroundShellServiceLoader() {
void BackgroundShellServiceLoader::LoadService(
ServiceManager* manager,
const GURL& url,
- ScopedMessagePipeHandle shell_handle) {
+ scoped_refptr<LoadServiceCallbacks> callbacks) {
+ ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication();
+ if (!shell_handle.is_valid())
+ return;
+
if (!thread_) {
// TODO(tim): It'd be nice if we could just have each LoadService call
// result in a new thread like DynamicService{Loader, Runner}. But some

Powered by Google App Engine
This is Rietveld 408576698