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

Unified Diff: shell/launcher_main.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/launcher_main.cc
diff --git a/shell/launcher_main.cc b/shell/launcher_main.cc
index 8c102d339ffe1496a2f3f904f354f93a4bcf539d..276dddb1d30b3d0a473cd2b7c26cf4cdb668ad4b 100644
--- a/shell/launcher_main.cc
+++ b/shell/launcher_main.cc
@@ -42,24 +42,25 @@ class Launcher {
base::Bind(&Launcher::OnRegistered, base::Unretained(this)));
run_loop_->Run();
run_loop_.reset();
- return shell_handle_.is_valid();
+ return application_request_.is_pending();
}
void Run() {
DCHECK(!run_loop_.get());
- DCHECK(shell_handle_.is_valid());
+ DCHECK(application_request_.is_pending());
mojo::shell::InProcessDynamicServiceRunner service_runner(nullptr);
run_loop_.reset(new base::RunLoop);
service_runner.Start(
- app_path_, shell_handle_.Pass(),
+ app_path_, application_request_.Pass(),
base::Bind(&Launcher::OnAppCompleted, base::Unretained(this)));
run_loop_->Run();
run_loop_.reset();
}
private:
- void OnRegistered(mojo::ShellPtr shell) {
- shell_handle_ = shell.PassMessagePipe();
+ void OnRegistered(
+ mojo::InterfaceRequest<mojo::Application> application_request) {
+ application_request_ = application_request.Pass();
run_loop_->Quit();
}
@@ -70,7 +71,7 @@ class Launcher {
std::vector<std::string> app_args_;
base::MessageLoop loop_;
mojo::shell::ExternalApplicationRegistrarConnection connection_;
- mojo::ScopedMessagePipeHandle shell_handle_;
+ mojo::InterfaceRequest<mojo::Application> application_request_;
scoped_ptr<base::RunLoop> run_loop_;
};

Powered by Google App Engine
This is Rietveld 408576698