Chromium Code Reviews| Index: ipc/ipc_test_sink.cc |
| diff --git a/ipc/ipc_test_sink.cc b/ipc/ipc_test_sink.cc |
| index 95900b6ca5074a164b45491431ffc7e86e5e9b66..bf25d30029072854db9e9a0177d8b54461082a28 100644 |
| --- a/ipc/ipc_test_sink.cc |
| +++ b/ipc/ipc_test_sink.cc |
| @@ -22,6 +22,7 @@ bool TestSink::Send(Message* message) { |
| bool TestSink::OnMessageReceived(const Message& msg) { |
| messages_.push_back(Message(msg)); |
| + FOR_EACH_OBSERVER(Observer, observer_list_, OnMessageReceived(msg)); |
| return true; |
| } |
| @@ -57,4 +58,12 @@ const Message* TestSink::GetUniqueMessageMatching(uint32 id) const { |
| return &messages_[found_index]; |
| } |
| +void TestSink::AddObserver(Observer* obs) { |
| + observer_list_.AddObserver(obs); |
| +} |
| + |
| +void TestSink::RemoveObserver(Observer* obs) { |
| + observer_list_.RemoveObserver(obs); |
|
noelutz
2011/01/28 02:13:06
Maybe check in the destructor that all observers h
Brian Ryner
2011/01/28 02:19:59
I'm not sure how common this is for observer inter
|
| +} |
| + |
| } // namespace IPC |