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

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

Issue 623883002: Revert "Move mojo edk into mojo/edk" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_EDK_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_
6 #define MOJO_EDK_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "mojo/edk/system/handle_signals_state.h"
11 #include "mojo/edk/system/message_in_transit_queue.h"
12 #include "mojo/edk/system/message_pipe_endpoint.h"
13 #include "mojo/edk/system/system_impl_export.h"
14 #include "mojo/edk/system/waiter_list.h"
15
16 namespace mojo {
17 namespace system {
18
19 class MOJO_SYSTEM_IMPL_EXPORT LocalMessagePipeEndpoint
20 : public MessagePipeEndpoint {
21 public:
22 LocalMessagePipeEndpoint();
23 virtual ~LocalMessagePipeEndpoint();
24
25 // |MessagePipeEndpoint| implementation:
26 virtual Type GetType() const override;
27 virtual bool OnPeerClose() override;
28 virtual void EnqueueMessage(scoped_ptr<MessageInTransit> message) override;
29
30 // There's a dispatcher for |LocalMessagePipeEndpoint|s, so we have to
31 // implement/override these:
32 virtual void Close() override;
33 virtual void CancelAllWaiters() override;
34 virtual MojoResult ReadMessage(UserPointer<void> bytes,
35 UserPointer<uint32_t> num_bytes,
36 DispatcherVector* dispatchers,
37 uint32_t* num_dispatchers,
38 MojoReadMessageFlags flags) override;
39 virtual HandleSignalsState GetHandleSignalsState() const override;
40 virtual MojoResult AddWaiter(Waiter* waiter,
41 MojoHandleSignals signals,
42 uint32_t context,
43 HandleSignalsState* signals_state) override;
44 virtual void RemoveWaiter(Waiter* waiter,
45 HandleSignalsState* signals_state) override;
46
47 // This is only to be used by |MessagePipe|:
48 MessageInTransitQueue* message_queue() { return &message_queue_; }
49
50 private:
51 bool is_open_;
52 bool is_peer_open_;
53
54 // Queue of incoming messages.
55 MessageInTransitQueue message_queue_;
56 WaiterList waiter_list_;
57
58 DISALLOW_COPY_AND_ASSIGN(LocalMessagePipeEndpoint);
59 };
60
61 } // namespace system
62 } // namespace mojo
63
64 #endif // MOJO_EDK_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/local_data_pipe_unittest.cc ('k') | mojo/edk/system/local_message_pipe_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698