| Index: content/browser/renderer_host/browser_plugin_message_filter.h
 | 
| diff --git a/content/browser/renderer_host/browser_plugin_message_filter.h b/content/browser/renderer_host/browser_plugin_message_filter.h
 | 
| new file mode 100644
 | 
| index 0000000000000000000000000000000000000000..8f7c7c6d7db4bab90cb08a3e7bdaa3e288c37e1b
 | 
| --- /dev/null
 | 
| +++ b/content/browser/renderer_host/browser_plugin_message_filter.h
 | 
| @@ -0,0 +1,60 @@
 | 
| +// Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_BROWSER_PLUGIN_MESSAGE_FILTER_H_
 | 
| +#define CONTENT_BROWSER_RENDERER_HOST_BROWSER_PLUGIN_MESSAGE_FILTER_H_
 | 
| +#pragma once
 | 
| +
 | 
| +#include "base/id_map.h"
 | 
| +#include "content/public/browser/browser_message_filter.h"
 | 
| +
 | 
| +namespace base {
 | 
| +class WaitableEvent;
 | 
| +}
 | 
| +
 | 
| +namespace content {
 | 
| +class WebContents;
 | 
| +}
 | 
| +
 | 
| +class GuestRenderViewHostObserver;
 | 
| +
 | 
| +// This class filters out incoming IPC messages for the browser plugin on the
 | 
| +// browser process.
 | 
| +  class BrowserPluginMessageFilter : public content::BrowserMessageFilter {
 | 
| +  public:
 | 
| +  // Create the filter.
 | 
| +  BrowserPluginMessageFilter(int render_process_id);
 | 
| +
 | 
| +  // content::BrowserMessageFilter methods:
 | 
| +  virtual bool OnMessageReceived(const IPC::Message& message,
 | 
| +                                 bool* message_was_ok) OVERRIDE;
 | 
| +
 | 
| +  int render_process_id() const { return render_process_id_; }
 | 
| +
 | 
| + private:
 | 
| +  virtual ~BrowserPluginMessageFilter();
 | 
| +  // Handler for ViewHostMsg_OpenChannelToBrowserPlugin
 | 
| +  // host_id is the routing id of the host RenderView.
 | 
| +  // instance_id is a unique identifier for the particular
 | 
| +  // box hosting the browser plugin that's about to be instantiated.
 | 
| +  // This identifier is generated in BrowserPluginPlaceholder.
 | 
| +  // src is the URL to navigate to on initial navigation.
 | 
| +  void OnOpenChannelToBrowserPlugin(int32 host_id,
 | 
| +                                    int32 instance_id,
 | 
| +                                    const std::string& src);
 | 
| +  // SiteInstance and WebContents need to run on the UI thread.
 | 
| +  // OnOpenChannelToBrowserPlugin PostTasks what it needs to do
 | 
| +  // on the UI thread, calling this method.
 | 
| +  void InitBrowserPluginOnUIThread(
 | 
| +      int32 routing_id,
 | 
| +      int32 instance_id,
 | 
| +      const std::string& src);
 | 
| +
 | 
| +  int render_process_id_;
 | 
| +  IDMap<content::WebContents*> guests_;
 | 
| +
 | 
| +  DISALLOW_COPY_AND_ASSIGN(BrowserPluginMessageFilter);
 | 
| +};
 | 
| +
 | 
| +#endif  // CONTENT_BROWSER_RENDERER_HOST_BROWSER_PLUGIN_MESSAGE_FILTER_H_
 | 
| 
 |