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

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

Issue 2766263009: Convert content ConnectionFilter to OnBindInterface (Closed)
Patch Set: . Created 3 years, 8 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/public/browser/render_process_host.h ('k') | content/public/browser/utility_process_mojo_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 d131f5b5267234313f5ecc4017c84e77f4b541cb..5a404dbec1112aad88ed313fba155b8d18d75658 100644
--- a/content/public/browser/utility_process_host.h
+++ b/content/public/browser/utility_process_host.h
@@ -10,17 +10,17 @@
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "content/common/content_export.h"
+#include "content/public/common/bind_interface_helpers.h"
#include "ipc/ipc_sender.h"
+#include "mojo/public/cpp/bindings/interface_ptr.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/cpp/system/message_pipe.h"
namespace base {
class FilePath;
class SequencedTaskRunner;
}
-namespace service_manager {
-class InterfaceProvider;
-}
-
namespace content {
class UtilityProcessHostClient;
struct ChildProcessData;
@@ -33,8 +33,7 @@ struct ChildProcessData;
// StartBatchMode(), then multiple calls to StartFooBar(p), then finish with
// EndBatchMode().
// If you need to bind Mojo interfaces, use Start() to start the child
-// process and GetRemoteInterfaces() to get the utility process'
-// service_manager::InterfaceProvider.
+// process and then call BindInterface().
//
// 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
@@ -82,10 +81,9 @@ class UtilityProcessHost : public IPC::Sender {
// Starts the utility process.
virtual bool Start() = 0;
- // Returns the service_manager::InterfaceProvider the browser process can use
- // to bind
- // interfaces exposed to it from the utility process.
- virtual service_manager::InterfaceProvider* GetRemoteInterfaces() = 0;
+ // Bind an interface exposed by the utility process.
+ virtual void BindInterface(const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) = 0;
// Set the name of the process to appear in the task manager.
virtual void SetName(const base::string16& name) = 0;
« no previous file with comments | « content/public/browser/render_process_host.h ('k') | content/public/browser/utility_process_mojo_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698