Pepper audio basic functionality unit test, take 3.
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/1591009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43623 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/common/ipc_test_sink.h b/chrome/common/ipc_test_sink.h
index 973fc71..96e91c0 100644
--- a/chrome/common/ipc_test_sink.h
+++ b/chrome/common/ipc_test_sink.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "ipc/ipc_channel.h"
#include "ipc/ipc_message.h"
namespace IPC {
@@ -40,11 +41,15 @@
//
// 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();
+ // Interface in IPC::Channel. This copies the message to the sink and then
+ // deletes it.
+ virtual bool Send(IPC::Message* message);
+
// 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);