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

Unified Diff: content/public/browser/utility_process_host.h

Issue 940813003: Use a utility process for the Mojo v8 proxy resolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-in-process-enable
Patch Set: Remove unneeded forward decl. 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 | « content/browser/utility_process_host_impl.cc ('k') | content/public/utility/content_utility_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b552cabfc26e83705322f1ca1ab4ee5e9d1ef8fd 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,13 @@ 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. Only valid to call this if
+ // the process was started with StartMojoMode().
+ virtual ServiceRegistry* GetServiceRegistry() = 0;
};
}; // namespace content
« no previous file with comments | « content/browser/utility_process_host_impl.cc ('k') | content/public/utility/content_utility_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698