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

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

Issue 325213004: Mojo: Wrap the satisfied/unsatisfied wait flags state in a single object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/system/local_data_pipe.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 "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "mojo/system/message_in_transit_queue.h" 10 #include "mojo/system/message_in_transit_queue.h"
11 #include "mojo/system/message_pipe_endpoint.h" 11 #include "mojo/system/message_pipe_endpoint.h"
12 #include "mojo/system/system_impl_export.h" 12 #include "mojo/system/system_impl_export.h"
13 #include "mojo/system/wait_flags_state.h"
13 #include "mojo/system/waiter_list.h" 14 #include "mojo/system/waiter_list.h"
14 15
15 namespace mojo { 16 namespace mojo {
16 namespace system { 17 namespace system {
17 18
18 class MOJO_SYSTEM_IMPL_EXPORT LocalMessagePipeEndpoint 19 class MOJO_SYSTEM_IMPL_EXPORT LocalMessagePipeEndpoint
19 : public MessagePipeEndpoint { 20 : public MessagePipeEndpoint {
20 public: 21 public:
21 LocalMessagePipeEndpoint(); 22 LocalMessagePipeEndpoint();
22 virtual ~LocalMessagePipeEndpoint(); 23 virtual ~LocalMessagePipeEndpoint();
(...skipping 14 matching lines...) Expand all
37 MojoReadMessageFlags flags) OVERRIDE; 38 MojoReadMessageFlags flags) OVERRIDE;
38 virtual MojoResult AddWaiter(Waiter* waiter, 39 virtual MojoResult AddWaiter(Waiter* waiter,
39 MojoWaitFlags flags, 40 MojoWaitFlags flags,
40 MojoResult wake_result) OVERRIDE; 41 MojoResult wake_result) OVERRIDE;
41 virtual void RemoveWaiter(Waiter* waiter) OVERRIDE; 42 virtual void RemoveWaiter(Waiter* waiter) OVERRIDE;
42 43
43 // This is only to be used by |ProxyMessagePipeEndpoint|: 44 // This is only to be used by |ProxyMessagePipeEndpoint|:
44 MessageInTransitQueue* message_queue() { return &message_queue_; } 45 MessageInTransitQueue* message_queue() { return &message_queue_; }
45 46
46 private: 47 private:
47 MojoWaitFlags SatisfiedFlags(); 48 WaitFlagsState GetWaitFlagsState();
48 MojoWaitFlags SatisfiableFlags();
49 49
50 bool is_open_; 50 bool is_open_;
51 bool is_peer_open_; 51 bool is_peer_open_;
52 52
53 // Queue of incoming messages. 53 // Queue of incoming messages.
54 MessageInTransitQueue message_queue_; 54 MessageInTransitQueue message_queue_;
55 WaiterList waiter_list_; 55 WaiterList waiter_list_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(LocalMessagePipeEndpoint); 57 DISALLOW_COPY_AND_ASSIGN(LocalMessagePipeEndpoint);
58 }; 58 };
59 59
60 } // namespace system 60 } // namespace system
61 } // namespace mojo 61 } // namespace mojo
62 62
63 #endif // MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ 63 #endif // MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_
OLDNEW
« no previous file with comments | « mojo/system/local_data_pipe.cc ('k') | mojo/system/local_message_pipe_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698