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

Unified Diff: shell/application_manager/application_manager.cc

Issue 873453004: Use ShellPtr type in ApplicationLoader instead of untyped handles (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix android Created 5 years, 11 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: shell/application_manager/application_manager.cc
diff --git a/shell/application_manager/application_manager.cc b/shell/application_manager/application_manager.cc
index 2cac11a8f0c9b5feda9ac892625eeacbf5e66e56..ff386e0d6e45066c3dd36a68a3672aaf15d4c5b7 100644
--- a/shell/application_manager/application_manager.cc
+++ b/shell/application_manager/application_manager.cc
@@ -140,13 +140,13 @@ void ApplicationManager::ConnectToApplicationImpl(
if (shell_it != url_to_shell_impl_.end()) {
shell = shell_it->second;
} else {
- MessagePipe pipe;
+ ShellPtr shell_ptr;
shell =
- new ShellImpl(pipe.handle0.Pass(), this, requested_url, resolved_url);
+ new ShellImpl(GetProxy(&shell_ptr), this, requested_url, resolved_url);
url_to_shell_impl_[resolved_url] = shell;
shell->client()->Initialize(GetArgsForURL(requested_url));
- loader->Load(this, resolved_url, pipe.handle1.Pass(),
+ loader->Load(this, resolved_url, shell_ptr.Pass(),
base::Bind(&ApplicationManager::LoadWithContentHandler,
weak_ptr_factory_.GetWeakPtr()));
}
@@ -167,7 +167,8 @@ void ApplicationManager::ConnectToClient(
void ApplicationManager::RegisterExternalApplication(
const GURL& url,
ScopedMessagePipeHandle shell_handle) {
- ShellImpl* shell_impl = new ShellImpl(shell_handle.Pass(), this, url, url);
+ ShellImpl* shell_impl =
+ new ShellImpl(MakeRequest<Shell>(shell_handle.Pass()), this, url, url);
url_to_shell_impl_[url] = shell_impl;
shell_impl->client()->Initialize(GetArgsForURL(url));
}
« no previous file with comments | « shell/application_manager/application_manager.h ('k') | shell/application_manager/application_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698