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

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

Issue 1530443005: EDK: Add PlatformHandleWatcher to Channel (and ChannelManager) classes. (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/system/channel.h ('k') | mojo/edk/system/channel_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel.cc
diff --git a/mojo/edk/system/channel.cc b/mojo/edk/system/channel.cc
index eb32544a0ccd750664f0dd2a646e9cba9cdfa1f8..74462243c1cdf072a226173f1288bbea7c9c83cb 100644
--- a/mojo/edk/system/channel.cc
+++ b/mojo/edk/system/channel.cc
@@ -12,7 +12,9 @@
#include "mojo/edk/system/transport_data.h"
#include "mojo/edk/util/string_printf.h"
+using mojo::platform::PlatformHandleWatcher;
using mojo::platform::ScopedPlatformHandle;
+using mojo::platform::TaskRunner;
using mojo::util::MakeRefCounted;
using mojo::util::MutexLocker;
using mojo::util::RefPtr;
@@ -33,7 +35,9 @@ struct SerializedEndpoint {
} // namespace
-void Channel::Init(std::unique_ptr<RawChannel> raw_channel) {
+void Channel::Init(RefPtr<TaskRunner>&& io_task_runner,
+ PlatformHandleWatcher* io_watcher,
+ std::unique_ptr<RawChannel> raw_channel) {
#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
DCHECK(thread_checker_.IsCreationThreadCurrent());
#endif // !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
@@ -43,6 +47,8 @@ void Channel::Init(std::unique_ptr<RawChannel> raw_channel) {
// becomes thread-safe.
DCHECK(!is_running_);
raw_channel_ = std::move(raw_channel);
+ // TODO(vtl): Add explicit |io_task_runner| and |io_watcher| arguments to
+ // |RawChannel::Init()| and pass them on.
raw_channel_->Init(this);
is_running_ = true;
}
« no previous file with comments | « mojo/edk/system/channel.h ('k') | mojo/edk/system/channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698