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_ENDPOINT_H_ | 5 #ifndef MOJO_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_ |
6 #define MOJO_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_ | 6 #define MOJO_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual MojoResult AddWaiter(Waiter* waiter, | 68 virtual MojoResult AddWaiter(Waiter* waiter, |
69 MojoHandleSignals signals, | 69 MojoHandleSignals signals, |
70 uint32_t context, | 70 uint32_t context, |
71 HandleSignalsState* signals_state); | 71 HandleSignalsState* signals_state); |
72 virtual void RemoveWaiter(Waiter* waiter, HandleSignalsState* signals_state); | 72 virtual void RemoveWaiter(Waiter* waiter, HandleSignalsState* signals_state); |
73 | 73 |
74 // Implementations must override these if they represent a proxy endpoint. An | 74 // Implementations must override these if they represent a proxy endpoint. An |
75 // implementation for a local endpoint needs not override these methods, since | 75 // implementation for a local endpoint needs not override these methods, since |
76 // they should never be called. | 76 // they should never be called. |
77 virtual void Attach(ChannelEndpoint* channel_endpoint); | 77 virtual void Attach(ChannelEndpoint* channel_endpoint); |
78 // Returns false if the endpoint should be closed and destroyed, else true. | |
79 virtual bool Run(); | |
80 virtual void OnRemove(); | 78 virtual void OnRemove(); |
81 | 79 |
82 protected: | 80 protected: |
83 MessagePipeEndpoint() {} | 81 MessagePipeEndpoint() {} |
84 | 82 |
85 private: | 83 private: |
86 DISALLOW_COPY_AND_ASSIGN(MessagePipeEndpoint); | 84 DISALLOW_COPY_AND_ASSIGN(MessagePipeEndpoint); |
87 }; | 85 }; |
88 | 86 |
89 } // namespace system | 87 } // namespace system |
90 } // namespace mojo | 88 } // namespace mojo |
91 | 89 |
92 #endif // MOJO_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_ | 90 #endif // MOJO_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_ |
OLD | NEW |