diff options
Diffstat (limited to 'chrome/renderer/mock_render_thread.cc')
-rw-r--r-- | chrome/renderer/mock_render_thread.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/renderer/mock_render_thread.cc b/chrome/renderer/mock_render_thread.cc index 1fa513f..35383cb 100644 --- a/chrome/renderer/mock_render_thread.cc +++ b/chrome/renderer/mock_render_thread.cc @@ -34,6 +34,16 @@ void MockRenderThread::RemoveRoute(int32 routing_id) { widget_ = NULL; } +// Called by, for example, RenderView::Init(), when adding a new message filter +void MockRenderThread::AddFilter(IPC::ChannelProxy::MessageFilter* filter) { + filter->OnFilterAdded(&sink()); +} + +// Called when the filter is removed +void MockRenderThread::RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) { + filter->OnFilterRemoved(); +} + // Called by the Widget. Used to send messages to the browser. // We short-circuit the mechanim and handle the messages right here on this // class. @@ -66,7 +76,7 @@ void MockRenderThread::SendCloseMessage() { void MockRenderThread::OnMessageReceived(const IPC::Message& msg) { // Save the message in the sink. - sink_.OnMessageReceived(msg); + sink_.Send(const_cast<IPC::Message*>(&msg)); // Some messages we do special handling. bool handled = true; |