EDK: Add a PlatformHandleWatcher argument to embedder::InitIPCSupport().
RawChannel should get the task runner and platform handle watcher
explicitly injected. Which means Channel should too. Which means that
IPCSupport should too. Which means that this function should take a
platform handle watcher. (I tried converting RawChannel first, but then
I would have had to do everything at once.)
R=vardhan@google.com
Review URL: https://codereview.chromium.org/1523883002 .
diff --git a/shell/task_runners.h b/shell/task_runners.h
index 5ed78b8..aed1f99 100644
--- a/shell/task_runners.h
+++ b/shell/task_runners.h
@@ -5,11 +5,14 @@
#ifndef SHELL_TASK_RUNNERS_H_
#define SHELL_TASK_RUNNERS_H_
+#include <memory>
+
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
+#include "mojo/edk/platform/platform_handle_watcher.h"
#include "mojo/edk/platform/task_runner.h"
#include "mojo/edk/util/ref_ptr.h"
@@ -35,6 +38,10 @@
return io_runner_;
}
+ mojo::platform::PlatformHandleWatcher* io_watcher() const {
+ return io_watcher_.get();
+ }
+
base::SequencedWorkerPool* blocking_pool() const {
return blocking_pool_.get();
}
@@ -43,6 +50,7 @@
mojo::util::RefPtr<mojo::platform::TaskRunner> shell_runner_;
scoped_ptr<base::Thread> io_thread_;
mojo::util::RefPtr<mojo::platform::TaskRunner> io_runner_;
+ std::unique_ptr<mojo::platform::PlatformHandleWatcher> io_watcher_;
scoped_refptr<base::SequencedWorkerPool> blocking_pool_;