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

Unified Diff: content/shell/browser/ipc_echo_message_filter.cc

Issue 478483005: Add IPC benchmarking API to Blink TestRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 6 years, 4 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/shell/browser/ipc_echo_message_filter.cc
diff --git a/content/shell/browser/ipc_echo_message_filter.cc b/content/shell/browser/ipc_echo_message_filter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d3837894b6790118f8c58084321a34cc0792c2aa
--- /dev/null
+++ b/content/shell/browser/ipc_echo_message_filter.cc
@@ -0,0 +1,33 @@
+// Copyright 2014 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.
+
+#include "content/shell/browser/ipc_echo_message_filter.h"
+
+#include "content/shell/common/shell_messages.h"
+
+namespace content {
+
+IPCEchoMessageFilter::IPCEchoMessageFilter()
+ : BrowserMessageFilter(ShellMsgStart) {
+}
+
+IPCEchoMessageFilter::~IPCEchoMessageFilter() {
+}
+
+bool IPCEchoMessageFilter::OnMessageReceived(const IPC::Message& message) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(IPCEchoMessageFilter, message)
+ IPC_MESSAGE_HANDLER(ShellViewHostMsg_EchoPing, OnEchoPing)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+
+ return handled;
+}
+
+void IPCEchoMessageFilter::OnEchoPing(int routing_id, int id,
+ const std::string& body) {
+ Send(new ShellViewMsg_EchoPong(routing_id, id, body));
+}
+
+} // namespace content
« no previous file with comments | « content/shell/browser/ipc_echo_message_filter.h ('k') | content/shell/browser/shell_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698