Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1579)

Unified Diff: content/browser/renderer_host/media/audio_renderer_host_unittest.cc

Issue 283623002: Add support for passing an arbitrary parameter to an IPC message handler. The motivation is for Web… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/audio_renderer_host_unittest.cc
===================================================================
--- content/browser/renderer_host/media/audio_renderer_host_unittest.cc (revision 270218)
+++ content/browser/renderer_host/media/audio_renderer_host_unittest.cc (working copy)
@@ -89,9 +89,9 @@
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(MockAudioRendererHost, *message)
IPC_MESSAGE_HANDLER(AudioMsg_NotifyStreamCreated,
- OnStreamCreated)
+ OnNotifyStreamCreated)
IPC_MESSAGE_HANDLER(AudioMsg_NotifyStreamStateChanged,
- OnStreamStateChanged)
+ OnNotifyStreamStateChanged)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
EXPECT_TRUE(handled);
@@ -100,15 +100,14 @@
return true;
}
- void OnStreamCreated(const IPC::Message& msg,
- int stream_id,
- base::SharedMemoryHandle handle,
+ void OnNotifyStreamCreated(int stream_id,
+ base::SharedMemoryHandle handle,
#if defined(OS_WIN)
- base::SyncSocket::Handle socket_handle,
+ base::SyncSocket::Handle socket_handle,
#else
- base::FileDescriptor socket_descriptor,
+ base::FileDescriptor socket_descriptor,
#endif
- uint32 length) {
+ uint32 length) {
// Maps the shared memory.
shared_memory_.reset(new base::SharedMemory(handle, false));
CHECK(shared_memory_->Map(length));
@@ -128,9 +127,8 @@
OnStreamCreated(stream_id, length);
}
- void OnStreamStateChanged(const IPC::Message& msg,
- int stream_id,
- media::AudioOutputIPCDelegate::State state) {
+ void OnNotifyStreamStateChanged(int stream_id,
+ media::AudioOutputIPCDelegate::State state) {
switch (state) {
case media::AudioOutputIPCDelegate::kPlaying:
OnStreamPlaying(stream_id);

Powered by Google App Engine
This is Rietveld 408576698