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

Side by Side Diff: content/child/npapi/plugin_url_fetcher.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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_CHILD_NPAPI_URL_FETCHER_H_
6 #define CONTENT_CHILD_NPAPI_URL_FETCHER_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "url/gurl.h"
12 #include "webkit/child/resource_loader_bridge.h"
13
14 namespace webkit_glue {
15 class ResourceLoaderBridge;
16 }
17
18 namespace content {
19 class PluginStreamUrl;
20
21 // Fetches URLS for a plugin using ResourceDispatcher.
22 class PluginURLFetcher : public webkit_glue::ResourceLoaderBridge::Peer {
23 public:
24 PluginURLFetcher(PluginStreamUrl* plugin_stream,
25 const GURL& url,
26 const GURL& first_party_for_cookies,
27 const std::string& method,
28 const std::string& post_data,
29 const GURL& referrer,
30 bool notify_redirects,
31 bool is_plugin_src_load,
32 int origin_pid,
33 int render_view_id,
34 unsigned long resource_id);
35 virtual ~PluginURLFetcher();
36
37 // Cancels the current request.
38 void Cancel();
39
40 // Called with the plugin's reply to NPP_URLRedirectNotify.
41 void URLRedirectResponse(bool allow);
42
43 private:
44 // webkit_glue::ResourceLoaderBridge::Peer implementation:
45 virtual void OnUploadProgress(uint64 position, uint64 size) OVERRIDE;
46 virtual bool OnReceivedRedirect(const GURL& new_url,
47 const webkit_glue::ResourceResponseInfo& info,
48 bool* has_new_first_party_for_cookies,
49 GURL* new_first_party_for_cookies) OVERRIDE;
50 virtual void OnReceivedResponse(
51 const webkit_glue::ResourceResponseInfo& info) OVERRIDE;
52 virtual void OnDownloadedData(int len, int encoded_data_length) OVERRIDE;
53 virtual void OnReceivedData(const char* data,
54 int data_length,
55 int encoded_data_length) OVERRIDE;
56 virtual void OnCompletedRequest(
57 int error_code,
58 bool was_ignored_by_handler,
59 const std::string& security_info,
60 const base::TimeTicks& completion_time) OVERRIDE;
61
62 PluginStreamUrl* plugin_stream_;
63 GURL url_;
64 GURL first_party_for_cookies_;
65 std::string method_;
66 std::string post_data_;
67 GURL referrer_;
68 bool notify_redirects_;
69 bool is_plugin_src_load_;
70 unsigned long resource_id_;
71 int data_offset_;
72
73 scoped_ptr<webkit_glue::ResourceLoaderBridge> bridge_;
74
75 DISALLOW_COPY_AND_ASSIGN(PluginURLFetcher);
76 };
77
78 } // namespace content
79
80 #endif // CONTENT_CHILD_NPAPI_URL_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698