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

Unified Diff: content/child/npapi/plugin_stream_url.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: sync 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/child/npapi/plugin_stream_url.h
===================================================================
--- content/child/npapi/plugin_stream_url.h (revision 222566)
+++ content/child/npapi/plugin_stream_url.h (working copy)
@@ -7,13 +7,14 @@
#include <vector>
+#include "base/memory/scoped_ptr.h"
#include "content/child/npapi/plugin_stream.h"
#include "content/child/npapi/webplugin_resource_client.h"
#include "url/gurl.h"
namespace content {
-
class PluginInstance;
+class PluginURLFetcher;
// A NPAPI Stream based on a URL.
class PluginStreamUrl : public PluginStream,
@@ -29,6 +30,10 @@
bool notify_needed,
void *notify_data);
+ void SetPluginURLFetcher(PluginURLFetcher* fetcher);
+
+ void URLRedirectResponse(bool allow);
+
// Stop sending the stream to the client.
// Overrides the base Close so we can cancel our fetching the URL if
// it is still loading.
@@ -58,12 +63,23 @@
private:
void SetDeferLoading(bool value);
+ // In case of a redirect, this can be called to update the url. But it must
+ // be called before Open().
+ void UpdateUrl(const char* url);
+
GURL url_;
unsigned long id_;
// Ids of additional resources requested via range requests issued on
// seekable streams.
std::vector<unsigned long> range_requests_;
+ // If the plugin participates in HTTP URL redirect handling then this member
+ // holds the url being redirected to while we wait for the plugin to make a
+ // decision on whether to allow or deny the redirect.
+ std::string pending_redirect_url_;
+
+ scoped_ptr<PluginURLFetcher> plugin_url_fetcher_;
+
DISALLOW_COPY_AND_ASSIGN(PluginStreamUrl);
};

Powered by Google App Engine
This is Rietveld 408576698