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

Unified Diff: shell/child_process_host.h

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/app_child_process_host.cc ('k') | shell/child_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/child_process_host.h
diff --git a/shell/child_process_host.h b/shell/child_process_host.h
index 98909fa03d4da62f0aca5d2d289725b051d270b9..fc4fff34950e5fe48807871d8a8a1e9d75691031 100644
--- a/shell/child_process_host.h
+++ b/shell/child_process_host.h
@@ -18,8 +18,7 @@ class Context;
// (Base) class for a "child process host". Handles launching and connecting a
// platform-specific "pipe" to the child, and supports joining the child
-// process. Intended for use as a base class, but may be used on its own in
-// simple cases.
+// process.
//
// This class is not thread-safe. It should be created/used/destroyed on a
// single thread.
@@ -27,19 +26,13 @@ class Context;
// Note: Does not currently work on Windows before Vista.
class ChildProcessHost {
public:
- class Delegate {
- public:
- virtual void WillStart() = 0;
- virtual void DidStart(bool success) = 0;
- };
-
- ChildProcessHost(Context* context, Delegate* delegate);
+ explicit ChildProcessHost(Context* context);
virtual ~ChildProcessHost();
- // |Start()|s the child process; calls the delegate's |DidStart()| (on the
- // thread on which |Start()| was called) when the child has been started (or
- // failed to start). After calling |Start()|, this object must not be
- // destroyed until |DidStart()| has been called.
+ // |Start()|s the child process; calls |DidStart()| (on the thread on which
+ // |Start()| was called) when the child has been started (or failed to start).
+ // After calling |Start()|, this object must not be destroyed until
+ // |DidStart()| has been called.
// TODO(vtl): Consider using weak pointers and removing this requirement.
void Start();
@@ -52,15 +45,16 @@ class ChildProcessHost {
return &platform_channel_;
}
+ virtual void WillStart() = 0;
+ virtual void DidStart(bool success) = 0;
+
protected:
Context* context() const { return context_; }
private:
bool DoLaunch();
- void DidLaunch(bool success);
Context* const context_;
- Delegate* const delegate_;
base::Process child_process_;
« no previous file with comments | « shell/app_child_process_host.cc ('k') | shell/child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698