Index: content/browser/utility_process_host.h |
=================================================================== |
--- content/browser/utility_process_host.h (revision 118420) |
+++ content/browser/utility_process_host.h (working copy) |
@@ -12,10 +12,13 @@ |
#include "base/basictypes.h" |
#include "base/memory/ref_counted.h" |
#include "base/process_util.h" |
-#include "content/browser/browser_child_process_host.h" |
#include "content/common/content_export.h" |
+#include "content/public/browser/browser_child_process_host_delegate.h" |
#include "content/public/browser/browser_thread.h" |
+#include "ipc/ipc_message.h" |
+class BrowserChildProcessHost; |
+ |
// This class acts as the browser-side host to a utility child process. A |
// utility process is a short-lived sandboxed process that is created to run |
// a specific task. This class lives solely on the IO thread. |
@@ -23,7 +26,9 @@ |
// If you need multiple batches of work to be done in the sandboxed process, |
// use StartBatchMode(), then multiple calls to StartFooBar(p), |
// then finish with EndBatchMode(). |
-class CONTENT_EXPORT UtilityProcessHost : public BrowserChildProcessHost { |
+class CONTENT_EXPORT UtilityProcessHost |
+ : public content::BrowserChildProcessHostDelegate, |
+ public IPC::Message::Sender { |
public: |
// An interface to be implemented by consumers of the utility process to |
// get results back. All functions are called on the thread passed along |
@@ -53,7 +58,7 @@ |
content::BrowserThread::ID client_thread_id); |
virtual ~UtilityProcessHost(); |
- // BrowserChildProcessHost override |
+ // IPC::Message::Sender implementation: |
virtual bool Send(IPC::Message* message) OVERRIDE; |
// Starts utility process in batch mode. Caller must call EndBatchMode() |
@@ -80,10 +85,8 @@ |
// has already been started via StartBatchMode(). |
bool StartProcess(); |
- // IPC messages: |
+ // BrowserChildProcessHost: |
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
- |
- // BrowserChildProcessHost: |
virtual void OnProcessCrashed(int exit_code) OVERRIDE; |
// A pointer to our client interface, who will be informed of progress. |
@@ -112,6 +115,8 @@ |
bool started_; |
+ scoped_ptr<BrowserChildProcessHost> process_; |
+ |
DISALLOW_COPY_AND_ASSIGN(UtilityProcessHost); |
}; |