1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/shell/browser/ipc_echo_message_filter.h"
7 #include "content/shell/common/shell_messages.h"
11 IPCEchoMessageFilter::IPCEchoMessageFilter()
12 : BrowserMessageFilter(ShellMsgStart) {
15 IPCEchoMessageFilter::~IPCEchoMessageFilter() {
18 bool IPCEchoMessageFilter::OnMessageReceived(const IPC::Message& message) {
20 IPC_BEGIN_MESSAGE_MAP(IPCEchoMessageFilter, message)
21 IPC_MESSAGE_HANDLER(ShellViewHostMsg_EchoPing, OnEchoPing)
22 IPC_MESSAGE_UNHANDLED(handled = false)
28 void IPCEchoMessageFilter::OnEchoPing(int routing_id, int id,
29 const std::string& body) {
30 Send(new ShellViewMsg_EchoPong(routing_id, id, body));
33 } // namespace content