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

Unified Diff: third_party/mojo/src/mojo/edk/system/channel_manager.h

Issue 910883002: Update mojo sdk to rev 8af2ccff2eee4bfca1043015abee30482a030b30 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply 9f87aeadbda22441b7d469e596f7bd7d0d73e2a8 (https://codereview.chromium.org/908973002/) Created 5 years, 10 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: third_party/mojo/src/mojo/edk/system/channel_manager.h
diff --git a/third_party/mojo/src/mojo/edk/system/channel_manager.h b/third_party/mojo/src/mojo/edk/system/channel_manager.h
index 35a4f27446ce99f350c4c5abd36500fa0afbb457..da3e030929caa5b194932dcd1aaa589af8baedf4 100644
--- a/third_party/mojo/src/mojo/edk/system/channel_manager.h
+++ b/third_party/mojo/src/mojo/edk/system/channel_manager.h
@@ -7,12 +7,12 @@
#include <stdint.h>
+#include "base/callback_forward.h"
#include "base/containers/hash_tables.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
-#include "mojo/edk/system/channel.h"
#include "mojo/edk/system/channel_info.h"
namespace base {
@@ -27,6 +27,10 @@ class PlatformSupport;
namespace system {
+class Channel;
+class ChannelEndpoint;
+class MessagePipeDispatcher;
+
// IDs for |Channel|s managed by a |ChannelManager|. (IDs should be thought of
// as specific to a given |ChannelManager|.) 0 is never a valid ID.
typedef uint64_t ChannelId;
@@ -49,27 +53,21 @@ class MOJO_SYSTEM_IMPL_EXPORT ChannelManager {
// TODO(vtl): Currently, this should be called on any I/O thread (which will
// become the new channel's "channel thread"). Eventually, the channel manager
// will have an assigned I/O thread, on which this must be called.
- // TODO(vtl): Probably this should return a message pipe dispatcher (for the
- // bootstrap message pipe) instead.
- void CreateChannelOnIOThread(
+ scoped_refptr<MessagePipeDispatcher> CreateChannelOnIOThread(
ChannelId channel_id,
- embedder::ScopedPlatformHandle platform_handle,
- scoped_refptr<system::ChannelEndpoint> bootstrap_channel_endpoint);
+ embedder::ScopedPlatformHandle platform_handle);
// Like |CreateChannelOnIOThread()|, but may be called from any thread. On
// completion, will call |callback| ("on" |io_thread_task_runner| if
- // |callback_thread_task_runner| is null else by posting to using
+ // |callback_thread_task_runner| is null else by posted using
// |callback_thread_task_runner|). Note: This will always post a task to the
// I/O thread, even if |io_thread_task_runner| is the task runner for the
// current thread.
// TODO(vtl): The |io_thread_task_runner| argument is temporary (we should use
// the channel manager's I/O thread).
- // TODO(vtl): Probably this should return a message pipe dispatcher (for the
- // bootstrap message pipe) instead.
- void CreateChannel(
+ scoped_refptr<MessagePipeDispatcher> CreateChannel(
ChannelId channel_id,
embedder::ScopedPlatformHandle platform_handle,
- scoped_refptr<system::ChannelEndpoint> bootstrap_channel_endpoint,
scoped_refptr<base::TaskRunner> io_thread_task_runner,
base::Closure callback,
scoped_refptr<base::TaskRunner> callback_thread_task_runner);
@@ -92,6 +90,14 @@ class MOJO_SYSTEM_IMPL_EXPORT ChannelManager {
void ShutdownChannel(ChannelId channel_id);
private:
+ // Used by |CreateChannelOnIOThread()| and |CreateChannelHelper()|. Called on
+ // the I/O thread.
+ void CreateChannelOnIOThreadHelper(
+ ChannelId channel_id,
+ embedder::ScopedPlatformHandle platform_handle,
+ scoped_refptr<system::ChannelEndpoint> bootstrap_channel_endpoint);
+
+ // Used by |CreateChannel()|. Called on the I/O thread.
void CreateChannelHelper(
ChannelId channel_id,
embedder::ScopedPlatformHandle platform_handle,
« no previous file with comments | « third_party/mojo/src/mojo/edk/system/channel_info.cc ('k') | third_party/mojo/src/mojo/edk/system/channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698