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

Unified Diff: mojo/edk/test/scoped_ipc_support.h

Issue 1523883002: EDK: Add a PlatformHandleWatcher argument to embedder::InitIPCSupport(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
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/embedder/embedder_unittest.cc ('k') | mojo/edk/test/scoped_ipc_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/test/scoped_ipc_support.h
diff --git a/mojo/edk/test/scoped_ipc_support.h b/mojo/edk/test/scoped_ipc_support.h
index 8fb88ee4bc47e8531c006a2022ef3abeb9cb0ddd..2f8be6eaf0bcee5dd938247cda16f17b3bd0046d 100644
--- a/mojo/edk/test/scoped_ipc_support.h
+++ b/mojo/edk/test/scoped_ipc_support.h
@@ -18,6 +18,11 @@
#include "mojo/public/cpp/system/macros.h"
namespace mojo {
+
+namespace platform {
+class PlatformHandleWatcher;
+}
+
namespace test {
namespace internal {
@@ -29,13 +34,15 @@ class ScopedIPCSupportHelper final {
void Init(embedder::ProcessType process_type,
embedder::ProcessDelegate* process_delegate,
- util::RefPtr<platform::TaskRunner>&& io_thread_task_runner,
+ util::RefPtr<platform::TaskRunner>&& io_task_runner,
+ platform::PlatformHandleWatcher* io_watcher,
platform::ScopedPlatformHandle platform_handle);
void OnShutdownCompleteImpl();
private:
- util::RefPtr<platform::TaskRunner> io_thread_task_runner_;
+ util::RefPtr<platform::TaskRunner> io_task_runner_;
+ platform::PlatformHandleWatcher* io_watcher_ = nullptr;
// Set after shut down.
util::ManualResetWaitableEvent event_;
@@ -51,8 +58,8 @@ class ScopedIPCSupportHelper final {
// thread).
class ScopedIPCSupport final : public embedder::ProcessDelegate {
public:
- explicit ScopedIPCSupport(
- util::RefPtr<platform::TaskRunner>&& io_thread_task_runner);
+ ScopedIPCSupport(util::RefPtr<platform::TaskRunner>&& io_task_runner,
+ platform::PlatformHandleWatcher* io_watcher);
~ScopedIPCSupport() override;
private:
@@ -69,12 +76,12 @@ class ScopedIPCSupport final : public embedder::ProcessDelegate {
// call a callback (on the I/O thread) on receiving |OnSlaveDisconnect()|.
class ScopedMasterIPCSupport final : public embedder::MasterProcessDelegate {
public:
- explicit ScopedMasterIPCSupport(
- util::RefPtr<platform::TaskRunner>&& io_thread_task_runner);
- ScopedMasterIPCSupport(
- util::RefPtr<platform::TaskRunner>&& io_thread_task_runner,
- std::function<void(embedder::SlaveInfo slave_info)>&&
- on_slave_disconnect);
+ ScopedMasterIPCSupport(util::RefPtr<platform::TaskRunner>&& io_task_runner,
+ platform::PlatformHandleWatcher* io_watcher);
+ ScopedMasterIPCSupport(util::RefPtr<platform::TaskRunner>&& io_task_runner,
+ platform::PlatformHandleWatcher* io_watcher,
+ std::function<void(embedder::SlaveInfo slave_info)>&&
+ on_slave_disconnect);
~ScopedMasterIPCSupport() override;
private:
@@ -93,13 +100,13 @@ class ScopedMasterIPCSupport final : public embedder::MasterProcessDelegate {
// call a callback (on the I/O thread) on receiving |OnMasterDisconnect()|.
class ScopedSlaveIPCSupport final : public embedder::SlaveProcessDelegate {
public:
- ScopedSlaveIPCSupport(
- util::RefPtr<platform::TaskRunner>&& io_thread_task_runner,
- platform::ScopedPlatformHandle platform_handle);
- ScopedSlaveIPCSupport(
- util::RefPtr<platform::TaskRunner>&& io_thread_task_runner,
- platform::ScopedPlatformHandle platform_handle,
- std::function<void()>&& on_master_disconnect);
+ ScopedSlaveIPCSupport(util::RefPtr<platform::TaskRunner>&& io_task_runner,
+ platform::PlatformHandleWatcher* io_watcher,
+ platform::ScopedPlatformHandle platform_handle);
+ ScopedSlaveIPCSupport(util::RefPtr<platform::TaskRunner>&& io_task_runner,
+ platform::PlatformHandleWatcher* io_watcher,
+ platform::ScopedPlatformHandle platform_handle,
+ std::function<void()>&& on_master_disconnect);
~ScopedSlaveIPCSupport() override;
private:
« no previous file with comments | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/test/scoped_ipc_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698