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

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host.h

Issue 7192016: chrome.experimental.downloads (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Bearings Before Woods Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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
11 11
12 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 12 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
13 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 13 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
14 #pragma once 14 #pragma once
15 15
16 #include <map> 16 #include <map>
17 #include <string> 17 #include <string>
18 #include <vector> 18 #include <vector>
19 19
20 #include "base/basictypes.h" 20 #include "base/basictypes.h"
21 #include "base/gtest_prod_util.h" 21 #include "base/gtest_prod_util.h"
22 #include "base/memory/scoped_ptr.h" 22 #include "base/memory/scoped_ptr.h"
23 #include "base/timer.h" 23 #include "base/timer.h"
24 #include "chrome/browser/renderer_host/download_resource_handler.h"
24 #include "content/browser/renderer_host/resource_queue.h" 25 #include "content/browser/renderer_host/resource_queue.h"
25 #include "content/common/child_process_info.h" 26 #include "content/common/child_process_info.h"
26 #include "content/common/notification_type.h" 27 #include "content/common/notification_type.h"
27 #include "ipc/ipc_message.h" 28 #include "ipc/ipc_message.h"
28 #include "net/url_request/url_request.h" 29 #include "net/url_request/url_request.h"
29 #include "webkit/glue/resource_type.h" 30 #include "webkit/glue/resource_type.h"
30 31
31 class CrossSiteResourceHandler; 32 class CrossSiteResourceHandler;
33 class DictionaryValue;
32 class DownloadFileManager; 34 class DownloadFileManager;
33 class DownloadRequestLimiter; 35 class DownloadRequestLimiter;
34 class LoginHandler; 36 class LoginHandler;
35 class NotificationDetails; 37 class NotificationDetails;
36 class PluginService; 38 class PluginService;
37 class ResourceDispatcherHostDelegate; 39 class ResourceDispatcherHostDelegate;
38 class ResourceDispatcherHostRequestInfo; 40 class ResourceDispatcherHostRequestInfo;
39 class ResourceHandler; 41 class ResourceHandler;
40 class ResourceMessageFilter; 42 class ResourceMessageFilter;
41 class SaveFileManager; 43 class SaveFileManager;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 bool OnMessageReceived(const IPC::Message& message, 76 bool OnMessageReceived(const IPC::Message& message,
75 ResourceMessageFilter* filter, 77 ResourceMessageFilter* filter,
76 bool* message_was_ok); 78 bool* message_was_ok);
77 79
78 // Initiates a download from the browser process (as opposed to a resource 80 // Initiates a download from the browser process (as opposed to a resource
79 // request from the renderer or another child process). 81 // request from the renderer or another child process).
80 void BeginDownload(const GURL& url, 82 void BeginDownload(const GURL& url,
81 const GURL& referrer, 83 const GURL& referrer,
82 const DownloadSaveInfo& save_info, 84 const DownloadSaveInfo& save_info,
83 bool prompt_for_save_location, 85 bool prompt_for_save_location,
86 std::string method,
87 DictionaryValue* extra_headers,
88 std::string post_body,
89 DownloadResourceHandler::OnResponseStartedCallback
90 started_cb,
91 DownloadResourceHandler::OnUnstartableCallback
92 unstartable_cb,
84 int process_unique_id, 93 int process_unique_id,
85 int route_id, 94 int route_id,
86 const content::ResourceContext& context); 95 const content::ResourceContext& context);
87 96
88 // Initiates a save file from the browser process (as opposed to a resource 97 // Initiates a save file from the browser process (as opposed to a resource
89 // request from the renderer or another child process). 98 // request from the renderer or another child process).
90 void BeginSaveFile(const GURL& url, 99 void BeginSaveFile(const GURL& url,
91 const GURL& referrer, 100 const GURL& referrer,
92 int process_unique_id, 101 int process_unique_id,
93 int route_id, 102 int route_id,
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 502
494 ResourceDispatcherHostDelegate* delegate_; 503 ResourceDispatcherHostDelegate* delegate_;
495 504
496 static bool is_prefetch_enabled_; 505 static bool is_prefetch_enabled_;
497 bool allow_cross_origin_auth_prompt_; 506 bool allow_cross_origin_auth_prompt_;
498 507
499 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); 508 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost);
500 }; 509 };
501 510
502 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 511 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698