OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_SYSTEM_MESSAGE_PIPE_H_ | 5 #ifndef MOJO_SYSTEM_MESSAGE_PIPE_H_ |
6 #define MOJO_SYSTEM_MESSAGE_PIPE_H_ | 6 #define MOJO_SYSTEM_MESSAGE_PIPE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 MojoResult EnqueueMessage(unsigned port, | 70 MojoResult EnqueueMessage(unsigned port, |
71 MessageInTransit* message, | 71 MessageInTransit* message, |
72 const std::vector<Dispatcher*>* dispatchers); | 72 const std::vector<Dispatcher*>* dispatchers); |
73 | 73 |
74 // These are used by |Channel|. | 74 // These are used by |Channel|. |
75 void Attach(unsigned port, | 75 void Attach(unsigned port, |
76 scoped_refptr<Channel> channel, | 76 scoped_refptr<Channel> channel, |
77 MessageInTransit::EndpointId local_id); | 77 MessageInTransit::EndpointId local_id); |
78 void Run(unsigned port, MessageInTransit::EndpointId remote_id); | 78 void Run(unsigned port, MessageInTransit::EndpointId remote_id); |
79 | 79 |
80 // This is used by |ProxyMessagePipeEndpoint| in sending an endpoint over | |
81 // another message pipe. | |
DaveMoore
2014/02/03 20:01:15
What is used?
viettrungluu
2014/02/03 20:09:11
Oops (stale comment), deleted.
| |
82 | |
80 private: | 83 private: |
81 friend class base::RefCountedThreadSafe<MessagePipe>; | 84 friend class base::RefCountedThreadSafe<MessagePipe>; |
82 virtual ~MessagePipe(); | 85 virtual ~MessagePipe(); |
83 | 86 |
84 // Used by |EnqueueMessage()| to handle control messages that are actually | 87 // Used by |EnqueueMessage()| to handle control messages that are actually |
85 // meant for us. | 88 // meant for us. |
86 MojoResult HandleControlMessage(unsigned port, MessageInTransit* message); | 89 MojoResult HandleControlMessage(unsigned port, MessageInTransit* message); |
87 | 90 |
88 base::Lock lock_; // Protects the following members. | 91 base::Lock lock_; // Protects the following members. |
89 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; | 92 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; |
90 | 93 |
91 DISALLOW_COPY_AND_ASSIGN(MessagePipe); | 94 DISALLOW_COPY_AND_ASSIGN(MessagePipe); |
92 }; | 95 }; |
93 | 96 |
94 } // namespace system | 97 } // namespace system |
95 } // namespace mojo | 98 } // namespace mojo |
96 | 99 |
97 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ | 100 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ |
OLD | NEW |