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

Unified Diff: content/public/test/mock_render_thread.cc

Issue 245443005: Move IPC::MessageFilter and router to a separate file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix gn build Created 6 years, 8 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
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | content/renderer/devtools/devtools_agent_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/mock_render_thread.cc
diff --git a/content/public/test/mock_render_thread.cc b/content/public/test/mock_render_thread.cc
index ba66d333b6dc2de5ae9b2130992cab27e4e5dcd0..f14a5576535f530f35bb8b64979895e770d5139f 100644
--- a/content/public/test/mock_render_thread.cc
+++ b/content/public/test/mock_render_thread.cc
@@ -11,6 +11,7 @@
#include "content/renderer/render_view_impl.h"
#include "ipc/ipc_message_utils.h"
#include "ipc/ipc_sync_message.h"
+#include "ipc/message_filter.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebScriptController.h"
@@ -27,7 +28,7 @@ MockRenderThread::MockRenderThread()
MockRenderThread::~MockRenderThread() {
while (!filters_.empty()) {
- scoped_refptr<IPC::ChannelProxy::MessageFilter> filter = filters_.back();
+ scoped_refptr<IPC::MessageFilter> filter = filters_.back();
filters_.pop_back();
filter->OnFilterRemoved();
}
@@ -93,14 +94,14 @@ int MockRenderThread::GenerateRoutingID() {
return MSG_ROUTING_NONE;
}
-void MockRenderThread::AddFilter(IPC::ChannelProxy::MessageFilter* filter) {
+void MockRenderThread::AddFilter(IPC::MessageFilter* filter) {
filter->OnFilterAdded(&sink());
// Add this filter to a vector so the MockRenderThread::RemoveFilter function
// can check if this filter is added.
filters_.push_back(make_scoped_refptr(filter));
}
-void MockRenderThread::RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) {
+void MockRenderThread::RemoveFilter(IPC::MessageFilter* filter) {
// Emulate the IPC::ChannelProxy::OnRemoveFilter function.
for (size_t i = 0; i < filters_.size(); ++i) {
if (filters_[i].get() == filter) {
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | content/renderer/devtools/devtools_agent_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698