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

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

Issue 263513004: Forward MIME types to BrowserPlugin when a viewer is specified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittests Created 6 years, 6 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
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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // assignment. 203 // assignment.
204 scoped_ptr<ResourceHandler> CreateResourceHandlerForDownload( 204 scoped_ptr<ResourceHandler> CreateResourceHandlerForDownload(
205 net::URLRequest* request, 205 net::URLRequest* request,
206 bool is_content_initiated, 206 bool is_content_initiated,
207 bool must_download, 207 bool must_download,
208 uint32 id, 208 uint32 id,
209 scoped_ptr<DownloadSaveInfo> save_info, 209 scoped_ptr<DownloadSaveInfo> save_info,
210 const DownloadUrlParameters::OnStartedCallback& started_cb); 210 const DownloadUrlParameters::OnStartedCallback& started_cb);
211 211
212 // Must be called after the ResourceRequestInfo has been created 212 // Must be called after the ResourceRequestInfo has been created
213 // and associated with the request. 213 // and associated with the request. If |payload| is set to a non-empty value,
214 // the value will be sent to the old resource handler instead of cancelling
215 // it, except on HTTP errors.
214 scoped_ptr<ResourceHandler> MaybeInterceptAsStream( 216 scoped_ptr<ResourceHandler> MaybeInterceptAsStream(
215 net::URLRequest* request, 217 net::URLRequest* request,
216 ResourceResponse* response); 218 ResourceResponse* response,
219 std::string* payload);
217 220
218 void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request); 221 void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request);
219 222
220 ResourceScheduler* scheduler() { return scheduler_.get(); } 223 ResourceScheduler* scheduler() { return scheduler_.get(); }
221 224
222 // Called by a ResourceHandler when it's ready to start reading data and 225 // Called by a ResourceHandler when it's ready to start reading data and
223 // sending it to the renderer. Returns true if there are enough file 226 // sending it to the renderer. Returns true if there are enough file
224 // descriptors available for the shared memory buffer. If false is returned, 227 // descriptors available for the shared memory buffer. If false is returned,
225 // the request should cancel. 228 // the request should cancel.
226 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); 229 bool HasSufficientResourcesForRequest(const net::URLRequest* request_);
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 DelegateMap delegate_map_; 505 DelegateMap delegate_map_;
503 506
504 scoped_ptr<ResourceScheduler> scheduler_; 507 scoped_ptr<ResourceScheduler> scheduler_;
505 508
506 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 509 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
507 }; 510 };
508 511
509 } // namespace content 512 } // namespace content
510 513
511 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 514 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/buffered_resource_handler.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698