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

Unified Diff: shell/child_process_host.cc

Issue 1050613002: Shell: Remove ChildProcessHost::Delegate. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « shell/child_process_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/child_process_host.cc
diff --git a/shell/child_process_host.cc b/shell/child_process_host.cc
index 13a52b5b81c2f36fde02a4d5e204c7a16f160e7a..a88b3ed6a617cde84708d459fff109b2704f9e52 100644
--- a/shell/child_process_host.cc
+++ b/shell/child_process_host.cc
@@ -20,9 +20,7 @@
namespace mojo {
namespace shell {
-ChildProcessHost::ChildProcessHost(Context* context, Delegate* delegate)
- : context_(context), delegate_(delegate) {
- DCHECK(delegate);
+ChildProcessHost::ChildProcessHost(Context* context) : context_(context) {
platform_channel_ = platform_channel_pair_.PassServerHandle();
CHECK(platform_channel_.is_valid());
}
@@ -37,12 +35,12 @@ ChildProcessHost::~ChildProcessHost() {
void ChildProcessHost::Start() {
DCHECK(!child_process_.IsValid());
- delegate_->WillStart();
+ WillStart();
CHECK(base::PostTaskAndReplyWithResult(
context_->task_runners()->blocking_pool(), FROM_HERE,
base::Bind(&ChildProcessHost::DoLaunch, base::Unretained(this)),
- base::Bind(&ChildProcessHost::DidLaunch, base::Unretained(this))));
+ base::Bind(&ChildProcessHost::DidStart, base::Unretained(this))));
}
int ChildProcessHost::Join() {
@@ -87,9 +85,5 @@ bool ChildProcessHost::DoLaunch() {
return true;
}
-void ChildProcessHost::DidLaunch(bool success) {
- delegate_->DidStart(success);
-}
-
} // namespace shell
} // namespace mojo
« no previous file with comments | « shell/child_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698