Index: content/public/browser/utility_process_host.h |
diff --git a/content/public/browser/utility_process_host.h b/content/public/browser/utility_process_host.h |
index 07f46ee0c7439a8b3514acb9bfd009d4478a1895..cb6324415a00a20c7c2194ff8467254a17e7ed8b 100644 |
--- a/content/public/browser/utility_process_host.h |
+++ b/content/public/browser/utility_process_host.h |
@@ -17,6 +17,7 @@ class SequencedTaskRunner; |
} |
namespace content { |
+class ServiceRegistry; |
class UtilityProcessHostClient; |
struct ChildProcessData; |
@@ -27,6 +28,9 @@ struct ChildProcessData; |
// If you need multiple batches of work to be done in the process, use |
// StartBatchMode(), then multiple calls to StartFooBar(p), then finish with |
// EndBatchMode(). |
+// If you need to call Mojo services, use StartMojoMode() to start the child |
+// process and GetServiceRegistry() to get the service registry to connect to |
+// the child's Mojo services. |
// |
// Note: If your class keeps a ptr to an object of this type, grab a weak ptr to |
// avoid a use after free since this object is deleted synchronously but the |
@@ -72,6 +76,12 @@ class UtilityProcessHost : public IPC::Sender, |
#if defined(OS_POSIX) |
virtual void SetEnv(const base::EnvironmentMap& env) = 0; |
#endif |
+ |
+ // Starts the utility process in Mojo mode. |
+ virtual bool StartMojoMode() = 0; |
+ |
+ // Returns the ServiceRegistry for this process. |
Sam McNally
2015/03/09 03:36:15
Is this valid to call if the utility process wasn'
Anand Mistry (off Chromium)
2015/03/10 07:24:24
No. Added comment.
|
+ virtual ServiceRegistry* GetServiceRegistry() = 0; |
}; |
}; // namespace content |