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_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ | 5 #ifndef MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ |
6 #define MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ | 6 #define MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 const std::vector<Dispatcher*>* dispatchers) OVERRIDE; | 31 const std::vector<Dispatcher*>* dispatchers) OVERRIDE; |
32 virtual void EnqueueMessage( | 32 virtual void EnqueueMessage( |
33 MessageInTransit* message, | 33 MessageInTransit* message, |
34 std::vector<scoped_refptr<Dispatcher> >* dispatchers) OVERRIDE; | 34 std::vector<scoped_refptr<Dispatcher> >* dispatchers) OVERRIDE; |
35 | 35 |
36 // There's a dispatcher for |LocalMessagePipeEndpoint|s, so we have to | 36 // There's a dispatcher for |LocalMessagePipeEndpoint|s, so we have to |
37 // implement/override these: | 37 // implement/override these: |
38 virtual void CancelAllWaiters() OVERRIDE; | 38 virtual void CancelAllWaiters() OVERRIDE; |
39 virtual MojoResult ReadMessage( | 39 virtual MojoResult ReadMessage( |
40 void* bytes, uint32_t* num_bytes, | 40 void* bytes, uint32_t* num_bytes, |
41 uint32_t max_num_dispatchers, | |
42 std::vector<scoped_refptr<Dispatcher> >* dispatchers, | 41 std::vector<scoped_refptr<Dispatcher> >* dispatchers, |
| 42 uint32_t* num_dispatchers, |
43 MojoReadMessageFlags flags) OVERRIDE; | 43 MojoReadMessageFlags flags) OVERRIDE; |
44 virtual MojoResult AddWaiter(Waiter* waiter, | 44 virtual MojoResult AddWaiter(Waiter* waiter, |
45 MojoWaitFlags flags, | 45 MojoWaitFlags flags, |
46 MojoResult wake_result) OVERRIDE; | 46 MojoResult wake_result) OVERRIDE; |
47 virtual void RemoveWaiter(Waiter* waiter) OVERRIDE; | 47 virtual void RemoveWaiter(Waiter* waiter) OVERRIDE; |
48 | 48 |
49 private: | 49 private: |
50 struct MessageQueueEntry { | 50 struct MessageQueueEntry { |
51 MessageQueueEntry(); | 51 MessageQueueEntry(); |
52 // Provide an explicit copy constructor, so that we can use this directly in | 52 // Provide an explicit copy constructor, so that we can use this directly in |
(...skipping 20 matching lines...) Expand all Loading... |
73 std::deque<MessageQueueEntry> message_queue_; | 73 std::deque<MessageQueueEntry> message_queue_; |
74 WaiterList waiter_list_; | 74 WaiterList waiter_list_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(LocalMessagePipeEndpoint); | 76 DISALLOW_COPY_AND_ASSIGN(LocalMessagePipeEndpoint); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace system | 79 } // namespace system |
80 } // namespace mojo | 80 } // namespace mojo |
81 | 81 |
82 #endif // MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ | 82 #endif // MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ |
OLD | NEW |