| 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 IPC_IPC_TEST_CHANNEL_LISTENER_H_ | 5 #ifndef IPC_IPC_TEST_CHANNEL_LISTENER_H_ |
| 6 #define IPC_IPC_TEST_CHANNEL_LISTENER_H_ | 6 #define IPC_IPC_TEST_CHANNEL_LISTENER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include "ipc/ipc_listener.h" | 10 #include "ipc/ipc_listener.h" |
| 9 | 11 |
| 10 namespace IPC { | 12 namespace IPC { |
| 11 | 13 |
| 12 class Sender; | 14 class Sender; |
| 13 | 15 |
| 14 // A generic listener that expects messages of a certain type (see | 16 // A generic listener that expects messages of a certain type (see |
| 15 // OnMessageReceived()), and either sends a generic response or quits after the | 17 // OnMessageReceived()), and either sends a generic response or quits after the |
| 16 // 50th message (or on channel error). | 18 // 50th message (or on channel error). |
| 17 class TestChannelListener : public Listener { | 19 class TestChannelListener : public Listener { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 35 void SendNextMessage(); | 37 void SendNextMessage(); |
| 36 | 38 |
| 37 private: | 39 private: |
| 38 Sender* sender_; | 40 Sender* sender_; |
| 39 int messages_left_; | 41 int messages_left_; |
| 40 }; | 42 }; |
| 41 | 43 |
| 42 } | 44 } |
| 43 | 45 |
| 44 #endif // IPC_IPC_TEST_CHANNEL_LISTENER_H_ | 46 #endif // IPC_IPC_TEST_CHANNEL_LISTENER_H_ |
| OLD | NEW |