OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PUBLIC_CPP_BINDINGS_MESSAGE_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // |responder| and will delete it after calling |responder->Accept| or upon | 193 // |responder| and will delete it after calling |responder->Accept| or upon |
194 // its own destruction. | 194 // its own destruction. |
195 // | 195 // |
196 // TODO(yzshen): consider changing |responder| to | 196 // TODO(yzshen): consider changing |responder| to |
197 // std::unique_ptr<MessageReceiver>. | 197 // std::unique_ptr<MessageReceiver>. |
198 virtual bool AcceptWithResponder(Message* message, | 198 virtual bool AcceptWithResponder(Message* message, |
199 MessageReceiverWithStatus* responder) | 199 MessageReceiverWithStatus* responder) |
200 WARN_UNUSED_RESULT = 0; | 200 WARN_UNUSED_RESULT = 0; |
201 }; | 201 }; |
202 | 202 |
| 203 class PassThroughFilter : public MessageReceiver { |
| 204 public: |
| 205 PassThroughFilter(); |
| 206 ~PassThroughFilter() override; |
| 207 |
| 208 // MessageReceiver: |
| 209 bool Accept(Message* message) override; |
| 210 |
| 211 private: |
| 212 DISALLOW_COPY_AND_ASSIGN(PassThroughFilter); |
| 213 }; |
| 214 |
203 namespace internal { | 215 namespace internal { |
204 class SyncMessageResponseSetup; | 216 class SyncMessageResponseSetup; |
205 } | 217 } |
206 | 218 |
207 // An object which should be constructed on the stack immediately before making | 219 // An object which should be constructed on the stack immediately before making |
208 // a sync request for which the caller wishes to perform custom validation of | 220 // a sync request for which the caller wishes to perform custom validation of |
209 // the response value(s). It is illegal to make more than one sync call during | 221 // the response value(s). It is illegal to make more than one sync call during |
210 // the lifetime of the topmost SyncMessageResponseContext, but it is legal to | 222 // the lifetime of the topmost SyncMessageResponseContext, but it is legal to |
211 // nest contexts to support reentrancy. | 223 // nest contexts to support reentrancy. |
212 // | 224 // |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // Acquires a callback which may be run to report the currently dispatching | 269 // Acquires a callback which may be run to report the currently dispatching |
258 // Message as bad. Note that this is only legal to call from directly within the | 270 // Message as bad. Note that this is only legal to call from directly within the |
259 // stack frame of a message dispatch, but the returned callback may be called | 271 // stack frame of a message dispatch, but the returned callback may be called |
260 // exactly once any time thereafter to report the message as bad. This may only | 272 // exactly once any time thereafter to report the message as bad. This may only |
261 // be called once per message. | 273 // be called once per message. |
262 ReportBadMessageCallback GetBadMessageCallback(); | 274 ReportBadMessageCallback GetBadMessageCallback(); |
263 | 275 |
264 } // namespace mojo | 276 } // namespace mojo |
265 | 277 |
266 #endif // MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_ | 278 #endif // MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_ |
OLD | NEW |