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

Unified Diff: chrome/service/service_ipc_server.h

Issue 2139643003: Use ChannelMojo between browser and service processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
Index: chrome/service/service_ipc_server.h
diff --git a/chrome/service/service_ipc_server.h b/chrome/service/service_ipc_server.h
index 34ed7081b4637befc2b14cd3b0e9951b2f424944..47a704bed3f754e86bb624603b534f01f94896db 100644
--- a/chrome/service/service_ipc_server.h
+++ b/chrome/service/service_ipc_server.h
@@ -12,10 +12,12 @@
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
+#include "base/single_thread_task_runner.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
#include "ipc/ipc_sync_channel.h"
+#include "mojo/public/cpp/system/message_pipe.h"
namespace base {
@@ -47,12 +49,14 @@ class ServiceIPCServer : public IPC::Listener, public IPC::Sender {
// Called when the IPC channel is closed. A return value of true indicates
// that the IPC server should continue listening for new connections.
virtual bool OnIPCClientDisconnect() = 0;
+
+ // Called to create a message pipe to use for an IPC Channel connection.
+ virtual mojo::ScopedMessagePipeHandle CreateChannelMessagePipe() = 0;
};
ServiceIPCServer(
Client* client,
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
- const IPC::ChannelHandle& handle,
base::WaitableEvent* shutdown_event);
~ServiceIPCServer() override;
@@ -88,13 +92,12 @@ class ServiceIPCServer : public IPC::Listener, public IPC::Sender {
Client* client_;
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
- IPC::ChannelHandle channel_handle_;
std::unique_ptr<IPC::SyncChannel> channel_;
base::WaitableEvent* shutdown_event_;
ScopedVector<MessageHandler> message_handlers_;
// Indicates whether an IPC client is currently connected to the channel.
- bool ipc_client_connected_;
+ bool ipc_client_connected_ = false;
// Calculates histograms deltas.
std::unique_ptr<base::HistogramDeltaSerialization>
« no previous file with comments | « chrome/browser/service_process/service_process_control_browsertest.cc ('k') | chrome/service/service_ipc_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698