2012-11-02 19:16:28 +01:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions copyright (c) 2011 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.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_RENDERER_RENDER_MESSAGE_FILTER_H_
|
|
|
|
#define CEF_LIBCEF_RENDERER_RENDER_MESSAGE_FILTER_H_
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "ipc/ipc_channel_proxy.h"
|
2014-05-29 19:15:34 +02:00
|
|
|
#include "ipc/message_filter.h"
|
2012-11-02 19:16:28 +01:00
|
|
|
|
|
|
|
// This class sends and receives control messages on the renderer process.
|
2014-05-29 19:15:34 +02:00
|
|
|
class CefRenderMessageFilter : public IPC::MessageFilter {
|
2012-11-02 19:16:28 +01:00
|
|
|
public:
|
|
|
|
CefRenderMessageFilter();
|
2014-11-12 20:25:15 +01:00
|
|
|
~CefRenderMessageFilter() override;
|
2012-11-02 19:16:28 +01:00
|
|
|
|
|
|
|
// IPC::ChannelProxy::MessageFilter implementation.
|
2014-11-12 20:25:15 +01:00
|
|
|
void OnFilterAdded(IPC::Sender* sender) override;
|
|
|
|
void OnFilterRemoved() override;
|
|
|
|
bool OnMessageReceived(const IPC::Message& message) override;
|
2012-11-02 19:16:28 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Message handlers called on the IO thread.
|
2014-07-02 20:25:22 +02:00
|
|
|
void OnDevToolsAgentAttach(const std::string& host_id);
|
2012-11-02 19:16:28 +01:00
|
|
|
void OnDevToolsAgentDetach();
|
|
|
|
|
|
|
|
void OnDevToolsAgentAttach_RT();
|
|
|
|
void OnDevToolsAgentDetach_IOT();
|
|
|
|
void OnDevToolsAgentDetach_RT();
|
|
|
|
|
2014-07-02 20:25:22 +02:00
|
|
|
IPC::Sender* sender_;
|
2012-11-02 19:16:28 +01:00
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefRenderMessageFilter);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_RENDERER_RENDER_MESSAGE_FILTER_H_
|