| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SINK_H_ | 5 #ifndef IPC_IPC_TEST_SINK_H_ |
| 6 #define IPC_IPC_TEST_SINK_H_ | 6 #define IPC_IPC_TEST_SINK_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // from OnMessageReceived, subsequent filters will not receive the message | 121 // from OnMessageReceived, subsequent filters will not receive the message |
| 122 // and the TestSink will not store it. | 122 // and the TestSink will not store it. |
| 123 void AddFilter(Listener* filter); | 123 void AddFilter(Listener* filter); |
| 124 | 124 |
| 125 // Removes the given filter from the TestSink. | 125 // Removes the given filter from the TestSink. |
| 126 void RemoveFilter(Listener* filter); | 126 void RemoveFilter(Listener* filter); |
| 127 | 127 |
| 128 private: | 128 private: |
| 129 // The actual list of received messages. | 129 // The actual list of received messages. |
| 130 std::vector<Message> messages_; | 130 std::vector<Message> messages_; |
| 131 ObserverList<Listener> filter_list_; | 131 base::ObserverList<Listener> filter_list_; |
| 132 | 132 |
| 133 DISALLOW_COPY_AND_ASSIGN(TestSink); | 133 DISALLOW_COPY_AND_ASSIGN(TestSink); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace IPC | 136 } // namespace IPC |
| 137 | 137 |
| 138 #endif // IPC_IPC_TEST_SINK_H_ | 138 #endif // IPC_IPC_TEST_SINK_H_ |
| OLD | NEW |