2012-04-03 03:34:16 +02: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_BROWSER_BROWSER_MESSAGE_FILTER_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_BROWSER_MESSAGE_FILTER_H_
|
|
|
|
|
2016-01-06 20:20:54 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
#include <string>
|
2016-01-06 20:20:54 +01:00
|
|
|
|
2017-05-31 17:33:30 +02:00
|
|
|
#include "content/public/browser/browser_message_filter.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2012-11-20 21:08:36 +01:00
|
|
|
struct CefProcessHostMsg_GetNewBrowserInfo_Params;
|
|
|
|
struct CefProcessHostMsg_GetNewRenderThreadInfo_Params;
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// This class sends and receives control messages on the browser process.
|
2017-05-31 17:33:30 +02:00
|
|
|
class CefBrowserMessageFilter : public content::BrowserMessageFilter {
|
2012-04-03 03:34:16 +02:00
|
|
|
public:
|
2016-05-11 18:18:43 +02:00
|
|
|
explicit CefBrowserMessageFilter(int render_process_id);
|
2014-11-12 20:25:15 +01:00
|
|
|
~CefBrowserMessageFilter() override;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// IPC::ChannelProxy::MessageFilter implementation.
|
2014-11-12 20:25:15 +01:00
|
|
|
void OnFilterRemoved() override;
|
|
|
|
bool OnMessageReceived(const IPC::Message& message) override;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Message handlers.
|
2012-11-20 21:08:36 +01:00
|
|
|
void OnGetNewRenderThreadInfo(
|
|
|
|
CefProcessHostMsg_GetNewRenderThreadInfo_Params* params);
|
2017-05-17 11:29:28 +02:00
|
|
|
void OnGetNewBrowserInfo(int render_view_routing_id,
|
|
|
|
int render_frame_routing_id,
|
|
|
|
IPC::Message* reply_msg);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2016-05-11 18:18:43 +02:00
|
|
|
int render_process_id_;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefBrowserMessageFilter);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_BROWSER_MESSAGE_FILTER_H_
|