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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.h

Issue 694773003: Allow URL requests for object/embed tags to be intercepted as streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-guest-view-container-3
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This is the browser side of the resource dispatcher, it receives requests 5 // This is the browser side of the resource dispatcher, it receives requests
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and
7 // dispatches them to URLRequests. It then forwards the messages from the 7 // dispatches them to URLRequests. It then forwards the messages from the
8 // URLRequests back to the correct process for handling. 8 // URLRequests back to the correct process for handling.
9 // 9 //
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // dialog boxes. 219 // dialog boxes.
220 bool allow_cross_origin_auth_prompt(); 220 bool allow_cross_origin_auth_prompt();
221 221
222 ResourceDispatcherHostDelegate* delegate() { 222 ResourceDispatcherHostDelegate* delegate() {
223 return delegate_; 223 return delegate_;
224 } 224 }
225 225
226 // Must be called after the ResourceRequestInfo has been created 226 // Must be called after the ResourceRequestInfo has been created
227 // and associated with the request. 227 // and associated with the request.
228 // |id| should be |content::DownloadItem::kInvalidId| to request automatic 228 // |id| should be |content::DownloadItem::kInvalidId| to request automatic
229 // assignment. 229 // assignment. This is marked virtual so it can be overriden in testing.
230 scoped_ptr<ResourceHandler> CreateResourceHandlerForDownload( 230 virtual scoped_ptr<ResourceHandler> CreateResourceHandlerForDownload(
231 net::URLRequest* request, 231 net::URLRequest* request,
232 bool is_content_initiated, 232 bool is_content_initiated,
233 bool must_download, 233 bool must_download,
234 uint32 id, 234 uint32 id,
235 scoped_ptr<DownloadSaveInfo> save_info, 235 scoped_ptr<DownloadSaveInfo> save_info,
236 const DownloadUrlParameters::OnStartedCallback& started_cb); 236 const DownloadUrlParameters::OnStartedCallback& started_cb);
237 237
238 // Must be called after the ResourceRequestInfo has been created 238 // Must be called after the ResourceRequestInfo has been created
239 // and associated with the request. If |payload| is set to a non-empty value, 239 // and associated with the request. If |payload| is set to a non-empty value,
240 // the value will be sent to the old resource handler instead of canceling 240 // the value will be sent to the old resource handler instead of canceling
241 // it, except on HTTP errors. 241 // it, except on HTTP errors. This is marked virtual so it can be overriden in
242 scoped_ptr<ResourceHandler> MaybeInterceptAsStream( 242 // testing.
243 virtual scoped_ptr<ResourceHandler> MaybeInterceptAsStream(
243 net::URLRequest* request, 244 net::URLRequest* request,
244 ResourceResponse* response, 245 ResourceResponse* response,
245 std::string* payload); 246 std::string* payload);
246 247
247 ResourceScheduler* scheduler() { return scheduler_.get(); } 248 ResourceScheduler* scheduler() { return scheduler_.get(); }
248 249
249 // Called by a ResourceHandler when it's ready to start reading data and 250 // Called by a ResourceHandler when it's ready to start reading data and
250 // sending it to the renderer. Returns true if there are enough file 251 // sending it to the renderer. Returns true if there are enough file
251 // descriptors available for the shared memory buffer. If false is returned, 252 // descriptors available for the shared memory buffer. If false is returned,
252 // the request should cancel. 253 // the request should cancel.
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 DelegateMap delegate_map_; 549 DelegateMap delegate_map_;
549 550
550 scoped_ptr<ResourceScheduler> scheduler_; 551 scoped_ptr<ResourceScheduler> scheduler_;
551 552
552 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 553 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
553 }; 554 };
554 555
555 } // namespace content 556 } // namespace content
556 557
557 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 558 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/buffered_resource_handler_unittest.cc ('k') | content/browser/loader/resource_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698