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

Unified Diff: mojo/edk/system/ipc_support.cc

Issue 1525883002: EDK: Add PlatformHandleWatcher to IPCSupport class. (Closed) Base URL: https://github.com/domokit/mojo.git@embedder_watcher
Patch Set: Created 5 years 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 | « mojo/edk/system/ipc_support.h ('k') | mojo/edk/system/ipc_support_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/ipc_support.cc
diff --git a/mojo/edk/system/ipc_support.cc b/mojo/edk/system/ipc_support.cc
index c3e10ba134711892764d39bfee473cf0faf9a4e2..f3d3ad6cb34e002f141edcda91b2ee41ab16c7be 100644
--- a/mojo/edk/system/ipc_support.cc
+++ b/mojo/edk/system/ipc_support.cc
@@ -15,6 +15,7 @@
#include "mojo/edk/system/message_pipe_dispatcher.h"
#include "mojo/edk/system/slave_connection_manager.h"
+using mojo::platform::PlatformHandleWatcher;
using mojo::platform::ScopedPlatformHandle;
using mojo::platform::TaskRunner;
using mojo::util::RefPtr;
@@ -26,14 +27,17 @@ IPCSupport::IPCSupport(embedder::PlatformSupport* platform_support,
embedder::ProcessType process_type,
RefPtr<TaskRunner>&& delegate_thread_task_runner,
embedder::ProcessDelegate* process_delegate,
- RefPtr<TaskRunner>&& io_thread_task_runner,
+ RefPtr<TaskRunner>&& io_task_runner,
+ PlatformHandleWatcher* io_watcher,
ScopedPlatformHandle platform_handle)
: process_type_(process_type),
delegate_thread_task_runner_(std::move(delegate_thread_task_runner)),
process_delegate_(process_delegate),
- io_thread_task_runner_(std::move(io_thread_task_runner)) {
+ io_task_runner_(std::move(io_task_runner)),
+ io_watcher_(io_watcher) {
DCHECK(delegate_thread_task_runner_);
- DCHECK(io_thread_task_runner_);
+ DCHECK(io_task_runner_);
+ DCHECK(io_watcher_);
switch (process_type_) {
case embedder::ProcessType::UNINITIALIZED:
@@ -63,9 +67,8 @@ IPCSupport::IPCSupport(embedder::PlatformSupport* platform_support,
break;
}
- channel_manager_.reset(new ChannelManager(platform_support,
- io_thread_task_runner_.Clone(),
- connection_manager_.get()));
+ channel_manager_.reset(new ChannelManager(
+ platform_support, io_task_runner_.Clone(), connection_manager_.get()));
}
IPCSupport::~IPCSupport() {
@@ -83,7 +86,8 @@ void IPCSupport::ShutdownOnIOThread() {
connection_manager_.reset();
}
- io_thread_task_runner_ = nullptr;
+ io_watcher_ = nullptr;
+ io_task_runner_ = nullptr;
process_delegate_ = nullptr;
delegate_thread_task_runner_ = nullptr;
process_type_ = embedder::ProcessType::UNINITIALIZED;
« no previous file with comments | « mojo/edk/system/ipc_support.h ('k') | mojo/edk/system/ipc_support_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698