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

Unified Diff: shell/android/background_application_loader.cc

Issue 868463008: Remove Client relationship between mojo.Shell/mojo.Application (Closed) Base URL: git@github.com:domokit/mojo.git@app_impl_init
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/android/background_application_loader.cc
diff --git a/shell/android/background_application_loader.cc b/shell/android/background_application_loader.cc
index 5a84ccbe5314d195ccabd55ec4d35d37e4b6e6ad..8f3c21b2abdffec41444d96dfdd4449f5f1be45d 100644
--- a/shell/android/background_application_loader.cc
+++ b/shell/android/background_application_loader.cc
@@ -25,11 +25,12 @@ BackgroundApplicationLoader::~BackgroundApplicationLoader() {
thread_->Join();
}
-void BackgroundApplicationLoader::Load(ApplicationManager* manager,
- const GURL& url,
- ShellPtr shell,
- LoadCallback callback) {
- DCHECK(shell);
+void BackgroundApplicationLoader::Load(
+ ApplicationManager* manager,
+ const GURL& url,
+ InterfaceRequest<Application> application_request,
+ LoadCallback callback) {
+ DCHECK(application_request.is_pending());
if (!thread_) {
// TODO(tim): It'd be nice if we could just have each Load call
// result in a new thread like DynamicService{Loader, Runner}. But some
@@ -46,7 +47,8 @@ void BackgroundApplicationLoader::Load(ApplicationManager* manager,
task_runner_->PostTask(
FROM_HERE,
base::Bind(&BackgroundApplicationLoader::LoadOnBackgroundThread,
- base::Unretained(this), manager, url, base::Passed(&shell)));
+ base::Unretained(this), manager, url,
+ base::Passed(&application_request)));
}
void BackgroundApplicationLoader::OnApplicationError(
@@ -74,9 +76,9 @@ void BackgroundApplicationLoader::Run() {
void BackgroundApplicationLoader::LoadOnBackgroundThread(
ApplicationManager* manager,
const GURL& url,
- ShellPtr shell) {
+ InterfaceRequest<Application> application_request) {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
- loader_->Load(manager, url, shell.Pass(), SimpleLoadCallback());
+ loader_->Load(manager, url, application_request.Pass(), SimpleLoadCallback());
}
void BackgroundApplicationLoader::OnApplicationErrorOnBackgroundThread(

Powered by Google App Engine
This is Rietveld 408576698