Index: content/plugin/webplugin_proxy.h |
=================================================================== |
--- content/plugin/webplugin_proxy.h (revision 222265) |
+++ content/plugin/webplugin_proxy.h (working copy) |
@@ -19,6 +19,7 @@ |
#include "base/timer/timer.h" |
#include "content/child/npapi/webplugin.h" |
#include "ipc/ipc_message.h" |
+#include "ipc/ipc_sender.h" |
#include "skia/ext/refptr.h" |
#include "third_party/skia/include/core/SkCanvas.h" |
#include "url/gurl.h" |
@@ -28,8 +29,11 @@ |
#include "ui/gl/gpu_preference.h" |
#include "ui/surface/transport_dib.h" |
+struct PluginMsg_FetchURL_Params; |
+ |
namespace content { |
class PluginChannel; |
+class PluginURLFetcher; |
class WebPluginDelegateImpl; |
#if defined(OS_MACOSX) |
@@ -38,7 +42,8 @@ |
// This is an implementation of WebPlugin that proxies all calls to the |
// renderer. |
-class WebPluginProxy : public WebPlugin { |
+class WebPluginProxy : public WebPlugin, |
+ public IPC::Sender { |
public: |
// Creates a new proxy for WebPlugin, using the given sender to send the |
// marshalled WebPlugin calls. |
@@ -54,10 +59,6 @@ |
virtual void SetWindow(gfx::PluginWindowHandle window) OVERRIDE; |
virtual void SetAcceptsInputEvents(bool accepts) OVERRIDE; |
virtual void WillDestroyWindow(gfx::PluginWindowHandle window) OVERRIDE; |
-#if defined(OS_WIN) |
- void SetWindowlessData(HANDLE pump_messages_event, |
- gfx::NativeViewId dummy_activation_window); |
-#endif |
virtual void CancelResource(unsigned long id) OVERRIDE; |
virtual void Invalidate() OVERRIDE; |
virtual void InvalidateRect(const gfx::Rect& rect) OVERRIDE; |
@@ -91,7 +92,11 @@ |
virtual bool IsOffTheRecord() OVERRIDE; |
virtual void ResourceClientDeleted( |
WebPluginResourceClient* resource_client) OVERRIDE; |
- |
+ virtual void URLRedirectResponse(bool allow, int resource_id) OVERRIDE; |
+#if defined(OS_WIN) |
+ void SetWindowlessData(HANDLE pump_messages_event, |
+ gfx::NativeViewId dummy_activation_window); |
+#endif |
#if defined(OS_MACOSX) |
virtual void FocusChanged(bool focused) OVERRIDE; |
virtual void StartIme() OVERRIDE; |
@@ -103,8 +108,10 @@ |
uint32 surface_id) OVERRIDE; |
virtual void AcceleratedPluginSwappedIOSurface() OVERRIDE; |
#endif |
- virtual void URLRedirectResponse(bool allow, int resource_id) OVERRIDE; |
+ // IPC::Sender implementation. |
+ virtual bool Send(IPC::Message* msg) OVERRIDE; |
+ |
// class-specific methods |
// Returns a WebPluginResourceClient object given its id, or NULL if no |
@@ -128,6 +135,9 @@ |
// Notification received on a plugin issued resource request creation. |
void OnResourceCreated(int resource_id, WebPluginResourceClient* client); |
+ // Starts fetching a URL through the browser process. |
+ void FetchURL(const PluginMsg_FetchURL_Params& params); |
+ |
#if defined(OS_WIN) && !defined(USE_AURA) |
// Retrieves the IME status from a windowless plug-in and sends it to a |
// renderer process. A renderer process will convert the coordinates from |
@@ -148,8 +158,6 @@ |
scoped_ptr<TransportDIB> dib_; |
}; |
- bool Send(IPC::Message* msg); |
- |
// Handler for sending over the paint event to the plugin. |
void OnPaint(const gfx::Rect& damaged_rect); |
@@ -201,6 +209,9 @@ |
typedef base::hash_map<int, WebPluginResourceClient*> ResourceClientMap; |
ResourceClientMap resource_clients_; |
+ typedef base::hash_map<int, PluginURLFetcher*> PluginURLFetcherMap; |
+ PluginURLFetcherMap plugin_url_fetchers_; |
+ |
scoped_refptr<PluginChannel> channel_; |
int route_id_; |
NPObject* window_npobject_; |