OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | |
6 | |
7 #include "content/browser/renderer_host/resource_handler.h" | |
8 #include "content/browser/ssl/ssl_client_auth_handler.h" | |
9 #include "content/public/browser/resource_dispatcher_host_login_delegate.h" | |
10 #include "net/url_request/url_request.h" | |
11 #include "webkit/blob/blob_data.h" | |
12 | |
13 ResourceDispatcherHostRequestInfo::ResourceDispatcherHostRequestInfo( | |
14 ResourceHandler* handler, | |
15 content::ProcessType process_type, | |
16 int child_id, | |
17 int route_id, | |
18 int origin_pid, | |
19 int request_id, | |
20 bool is_main_frame, | |
21 int64 frame_id, | |
22 bool parent_is_main_frame, | |
23 int64 parent_frame_id, | |
24 ResourceType::Type resource_type, | |
25 content::PageTransition transition_type, | |
26 uint64 upload_size, | |
27 bool is_download, | |
28 bool allow_download, | |
29 bool has_user_gesture, | |
30 WebKit::WebReferrerPolicy referrer_policy, | |
31 content::ResourceContext* context) | |
32 : resource_handler_(handler), | |
33 cross_site_handler_(NULL), | |
34 process_type_(process_type), | |
35 child_id_(child_id), | |
36 route_id_(route_id), | |
37 origin_pid_(origin_pid), | |
38 request_id_(request_id), | |
39 is_main_frame_(is_main_frame), | |
40 frame_id_(frame_id), | |
41 parent_is_main_frame_(parent_is_main_frame), | |
42 parent_frame_id_(parent_frame_id), | |
43 pending_data_count_(0), | |
44 is_download_(is_download), | |
45 allow_download_(allow_download), | |
46 has_user_gesture_(has_user_gesture), | |
47 pause_count_(0), | |
48 resource_type_(resource_type), | |
49 transition_type_(transition_type), | |
50 upload_size_(upload_size), | |
51 last_upload_position_(0), | |
52 waiting_for_upload_progress_ack_(false), | |
53 memory_cost_(0), | |
54 referrer_policy_(referrer_policy), | |
55 context_(context), | |
56 is_paused_(false), | |
57 called_on_response_started_(false), | |
58 has_started_reading_(false), | |
59 paused_read_bytes_(0) { | |
60 } | |
61 | |
62 ResourceDispatcherHostRequestInfo::~ResourceDispatcherHostRequestInfo() { | |
63 resource_handler_->OnRequestClosed(); | |
64 } | |
65 | |
66 void ResourceDispatcherHostRequestInfo::set_resource_handler( | |
67 ResourceHandler* resource_handler) { | |
68 resource_handler_ = resource_handler; | |
69 } | |
70 | |
71 void ResourceDispatcherHostRequestInfo::set_login_delegate( | |
72 content::ResourceDispatcherHostLoginDelegate* ld) { | |
73 login_delegate_ = ld; | |
74 } | |
75 | |
76 void ResourceDispatcherHostRequestInfo::set_ssl_client_auth_handler( | |
77 SSLClientAuthHandler* s) { | |
78 ssl_client_auth_handler_ = s; | |
79 } | |
80 | |
81 void ResourceDispatcherHostRequestInfo::set_requested_blob_data( | |
82 webkit_blob::BlobData* data) { | |
83 requested_blob_data_ = data; | |
84 } | |
OLD | NEW |