summaryrefslogtreecommitdiffstats
path: root/content/child/npapi/webplugin_delegate_impl.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-11 19:13:03 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-11 19:13:03 +0000
commit01cb1991150f05ffb77a43e98005661671a0aff0 (patch)
treec61b5e8446110c284eed4812ce511d5117853a9e /content/child/npapi/webplugin_delegate_impl.h
parent35179be6fcd7cf9cb4db346e266621aab6941c14 (diff)
downloadchromium_src-01cb1991150f05ffb77a43e98005661671a0aff0.zip
chromium_src-01cb1991150f05ffb77a43e98005661671a0aff0.tar.gz
chromium_src-01cb1991150f05ffb77a43e98005661671a0aff0.tar.bz2
Load NPAPI plugin resources through the browser process directly instead of going through the renderer. This is needed because when we have site isolation enabled we won't trust the renderer to fetch urls from arbitrary origins, which is something that NPAPI plugins can do.
In a followup I'll implement range requests. For now this is behind the --direct-npapi-requests flag. BUG=286074 R=ananta@chromium.org, jschuh@chromium.org Review URL: https://codereview.chromium.org/23503043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/child/npapi/webplugin_delegate_impl.h')
-rw-r--r--content/child/npapi/webplugin_delegate_impl.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/content/child/npapi/webplugin_delegate_impl.h b/content/child/npapi/webplugin_delegate_impl.h
index 19ccc35..92962ff 100644
--- a/content/child/npapi/webplugin_delegate_impl.h
+++ b/content/child/npapi/webplugin_delegate_impl.h
@@ -41,8 +41,9 @@ class CARenderer;
#endif
namespace content {
-
class PluginInstance;
+class PluginURLFetcher;
+class WebPlugin;
#if defined(OS_MACOSX)
class WebPluginAcceleratedSurface;
@@ -77,14 +78,14 @@ class WebPluginDelegateImpl : public WebPluginDelegate {
PLUGIN_QUIRK_EMULATE_IME = 131072, // Windows.
};
- static WebPluginDelegateImpl* Create(const base::FilePath& filename,
+ static WebPluginDelegateImpl* Create(WebPlugin* plugin,
+ const base::FilePath& filename,
const std::string& mime_type);
// WebPluginDelegate implementation
virtual bool Initialize(const GURL& url,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
- WebPlugin* plugin,
bool load_manually) OVERRIDE;
virtual void PluginDestroyed() OVERRIDE;
virtual void UpdateGeometry(const gfx::Rect& window_rect,
@@ -116,6 +117,17 @@ class WebPluginDelegateImpl : public WebPluginDelegate {
unsigned long resource_id, const GURL& url, int notify_id) OVERRIDE;
virtual WebPluginResourceClient* CreateSeekableResourceClient(
unsigned long resource_id, int range_request_id) OVERRIDE;
+ virtual void FetchURL(unsigned long resource_id,
+ int notify_id,
+ const GURL& url,
+ const GURL& first_party_for_cookies,
+ const std::string& method,
+ const std::string& post_data,
+ const GURL& referrer,
+ bool notify_redirects,
+ bool is_plugin_src_load,
+ int origin_pid,
+ int render_view_id) OVERRIDE;
// End of WebPluginDelegate implementation.
gfx::PluginWindowHandle windowed_handle() const { return windowed_handle_; }
@@ -193,7 +205,7 @@ class WebPluginDelegateImpl : public WebPluginDelegate {
friend class base::DeleteHelper<WebPluginDelegateImpl>;
friend class WebPluginDelegate;
- explicit WebPluginDelegateImpl(PluginInstance* instance);
+ WebPluginDelegateImpl(WebPlugin* plugin, PluginInstance* instance);
virtual ~WebPluginDelegateImpl();
// Called by Initialize() for platform-specific initialization.