Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: content/plugin/webplugin_proxy.h

Issue 23503043: Load NPAPI plugin resources through the browser process directly instead of going through the render (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: plumb RenderView's routing IDs Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;

Powered by Google App Engine
This is Rietveld 408576698