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

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

Issue 728133002: Update mojo sdk to rev e01f9a49449381a5eb430c1fd88bf2cae73ec35a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + ios gyp fixes Created 6 years, 1 month 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/BUILD.gn ('k') | mojo/edk/system/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel.h
diff --git a/mojo/edk/system/channel.h b/mojo/edk/system/channel.h
index 6697965615f00208570fb2e074380acf04e14cf2..715d1f2ce749edfa10b250ead5a47d813d0052ec 100644
--- a/mojo/edk/system/channel.h
+++ b/mojo/edk/system/channel.h
@@ -32,6 +32,7 @@ class PlatformSupport;
namespace system {
class ChannelEndpoint;
+class ChannelManager;
// This class is mostly thread-safe. It must be created on an I/O thread.
// |Init()| must be called on that same thread before it becomes thread-safe (in
@@ -61,6 +62,11 @@ class MOJO_SYSTEM_IMPL_EXPORT Channel
// failure, no other methods should be called (including |Shutdown()|).
bool Init(scoped_ptr<RawChannel> raw_channel);
+ // Sets the channel manager associated with this channel. This should be set
+ // at most once and only called before |WillShutdownSoon()| (and
+ // |Shutdown()|).
+ void SetChannelManager(ChannelManager* channel_manager);
+
// This must be called on the creation thread before destruction (which can
// happen on any thread).
void Shutdown();
@@ -69,6 +75,8 @@ class MOJO_SYSTEM_IMPL_EXPORT Channel
// thread, unlike |Shutdown()|). Warnings will be issued if, e.g., messages
// are written after this is called; other warnings may be suppressed. (This
// may be called multiple times, or not at all.)
+ //
+ // If set, the channel manager associated with this channel will be reset.
void WillShutdownSoon();
// Attaches the given endpoint to this channel and runs it. |is_bootstrap|
@@ -175,6 +183,9 @@ class MOJO_SYSTEM_IMPL_EXPORT Channel
// Set when |WillShutdownSoon()| is called.
bool is_shutting_down_;
+ // Has a reference to us.
+ ChannelManager* channel_manager_;
+
typedef base::hash_map<ChannelEndpointId, scoped_refptr<ChannelEndpoint>>
IdToEndpointMap;
// Map from local IDs to endpoints. If the endpoint is null, this means that
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698