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

Side by Side Diff: mojo/system/local_message_pipe_endpoint.h

Issue 66963005: Mojo: Implement local passing of MessagePipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/system/dispatcher_unittest.cc ('k') | mojo/system/local_message_pipe_endpoint.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « mojo/system/dispatcher_unittest.cc ('k') | mojo/system/local_message_pipe_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698