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

Side by Side Diff: webkit/glue/resource_loader_bridge.h

Issue 27168: IPC messages and changes to ResourceLoaderBridge to support resource loading for media (Closed)
Patch Set: add mac/linux build and fixed unit test failures Created 11 years, 9 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
« no previous file with comments | « net/url_request/url_request.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The intent of this file is to provide a type-neutral abstraction between 5 // The intent of this file is to provide a type-neutral abstraction between
6 // Chrome and WebKit for resource loading. This pure-virtual interface is 6 // Chrome and WebKit for resource loading. This pure-virtual interface is
7 // implemented by the embedder, which also provides a factory method Create 7 // implemented by the embedder, which also provides a factory method Create
8 // to instantiate this object. 8 // to instantiate this object.
9 // 9 //
10 // One of these objects will be created by WebKit for each request. WebKit 10 // One of these objects will be created by WebKit for each request. WebKit
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // within webkit. The Peer and it's bridge should have identical lifetimes 84 // within webkit. The Peer and it's bridge should have identical lifetimes
85 // as they represent each end of a communication channel. 85 // as they represent each end of a communication channel.
86 // 86 //
87 // These callbacks mirror URLRequest::Delegate and the order and conditions 87 // These callbacks mirror URLRequest::Delegate and the order and conditions
88 // in which they will be called are identical. See url_request.h for more 88 // in which they will be called are identical. See url_request.h for more
89 // information. 89 // information.
90 class Peer { 90 class Peer {
91 public: 91 public:
92 virtual ~Peer() {} 92 virtual ~Peer() {}
93 93
94 // Called as download progress is made.
95 // note: only for requests with LOAD_ENABLE_DOWNLOAD_FILE set and the
96 // resource is downloaded to a standalone file and the file handle to it is
97 // passed in ResponseInfo during OnReceivedResponse. Note that size may be
98 // unknown and |size| will be kuint64max in that case.
99 virtual void OnDownloadProgress(uint64 position, uint64 size) {}
100
94 // Called as upload progress is made. 101 // Called as upload progress is made.
95 // note: only for requests with LOAD_ENABLE_UPLOAD_PROGRESS set 102 // note: only for requests with LOAD_ENABLE_UPLOAD_PROGRESS set
96 virtual void OnUploadProgress(uint64 position, uint64 size) = 0; 103 virtual void OnUploadProgress(uint64 position, uint64 size) = 0;
97 104
98 // Called when a redirect occurs. 105 // Called when a redirect occurs.
99 virtual void OnReceivedRedirect(const GURL& new_url) = 0; 106 virtual void OnReceivedRedirect(const GURL& new_url) = 0;
100 107
101 // Called when response headers are available (after all redirects have 108 // Called when response headers are available (after all redirects have
102 // been followed). |content_filtered| is set to true if the contents is 109 // been followed). |content_filtered| is set to true if the contents is
103 // altered or replaced (usually for security reasons when the resource is 110 // altered or replaced (usually for security reasons when the resource is
104 // deemed unsafe). 111 // deemed unsafe).
105 virtual void OnReceivedResponse(const ResponseInfo& info, 112 virtual void OnReceivedResponse(const ResponseInfo& info,
106 bool content_filtered) = 0; 113 bool content_filtered) = 0;
107 114
108 // Called when a chunk of response data is available. This method may 115 // Called when a chunk of response data is available. This method may
109 // be called multiple times or not at all if an error occurs. 116 // be called multiple times or not at all if an error occurs.
110 virtual void OnReceivedData(const char* data, int len) = 0; 117 virtual void OnReceivedData(const char* data, int len) = 0;
111 118
112 // Called when the response is complete. This method signals completion of 119 // Called when the response is complete. This method signals completion of
113 // the resource load.ff 120 // the resource load.ff
114 virtual void OnCompletedRequest(const URLRequestStatus& status, 121 virtual void OnCompletedRequest(const URLRequestStatus& status,
115 const std::string& security_info) = 0; 122 const std::string& security_info) = 0;
116 123
117 // Returns the URL of the request, which allows us to display it in 124 // Returns the URL of the request, which allows us to display it in
118 // debugging situations. 125 // debugging situations.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // construction must go through Create() 210 // construction must go through Create()
204 ResourceLoaderBridge(); 211 ResourceLoaderBridge();
205 212
206 private: 213 private:
207 DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge); 214 DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge);
208 }; 215 };
209 216
210 } // namespace webkit_glue 217 } // namespace webkit_glue
211 218
212 #endif // RESOURCE_LOADER_BRIDGE_ 219 #endif // RESOURCE_LOADER_BRIDGE_
OLDNEW
« no previous file with comments | « net/url_request/url_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698