From bb06e1bc0c6ebb2988a7ffcfefa22bfccdd82e23 Mon Sep 17 00:00:00 2001 From: "neb@chromium.org" Date: Thu, 25 Mar 2010 19:39:57 +0000 Subject: Add a Pepper audio basic functionality unit test. Also changed TestSink to be derived from IPC::Channel and made MockRenderThread service AddFilter/RemoveFilter, so that it can be used by MessageFilters. Review URL: http://codereview.chromium.org/1207005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42656 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/ipc_test_sink.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'chrome/common/ipc_test_sink.h') diff --git a/chrome/common/ipc_test_sink.h b/chrome/common/ipc_test_sink.h index 973fc71..056cb4c 100644 --- a/chrome/common/ipc_test_sink.h +++ b/chrome/common/ipc_test_sink.h @@ -10,6 +10,7 @@ #include "base/basictypes.h" #include "ipc/ipc_message.h" +#include "ipc/ipc_channel.h" namespace IPC { @@ -40,14 +41,14 @@ namespace IPC { // // To hook up the sink, all you need to do is call OnMessageReceived when a // message is received. -class TestSink { +class TestSink : public IPC::Channel { public: TestSink(); ~TestSink(); // Used by the source of the messages to send the message to the sink. This // will make a copy of the message and store it in the list. - void OnMessageReceived(const Message& msg); + virtual bool Send(Message* message); // Returns the number of messages in the queue. size_t message_count() const { return messages_.size(); } -- cgit v1.1