OLD | NEW |
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 #include "content/browser/renderer_host/resource_request_info_impl.h" | 5 #include "content/browser/renderer_host/resource_request_info_impl.h" |
6 | 6 |
7 #include "content/browser/worker_host/worker_service_impl.h" | 7 #include "content/browser/worker_host/worker_service_impl.h" |
8 #include "content/common/net/url_request_user_data.h" | 8 #include "content/common/net/url_request_user_data.h" |
9 #include "content/public/browser/global_request_id.h" | 9 #include "content/public/browser/global_request_id.h" |
10 #include "net/url_request/url_request.h" | 10 #include "net/url_request/url_request.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 route_id_(route_id), | 102 route_id_(route_id), |
103 origin_pid_(origin_pid), | 103 origin_pid_(origin_pid), |
104 request_id_(request_id), | 104 request_id_(request_id), |
105 is_main_frame_(is_main_frame), | 105 is_main_frame_(is_main_frame), |
106 frame_id_(frame_id), | 106 frame_id_(frame_id), |
107 parent_is_main_frame_(parent_is_main_frame), | 107 parent_is_main_frame_(parent_is_main_frame), |
108 parent_frame_id_(parent_frame_id), | 108 parent_frame_id_(parent_frame_id), |
109 is_download_(is_download), | 109 is_download_(is_download), |
110 allow_download_(allow_download), | 110 allow_download_(allow_download), |
111 has_user_gesture_(has_user_gesture), | 111 has_user_gesture_(has_user_gesture), |
| 112 was_ignored_by_handler_(false), |
112 resource_type_(resource_type), | 113 resource_type_(resource_type), |
113 transition_type_(transition_type), | 114 transition_type_(transition_type), |
114 memory_cost_(0), | 115 memory_cost_(0), |
115 referrer_policy_(referrer_policy), | 116 referrer_policy_(referrer_policy), |
116 context_(context) { | 117 context_(context) { |
117 } | 118 } |
118 | 119 |
119 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { | 120 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { |
120 } | 121 } |
121 | 122 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 161 } |
161 | 162 |
162 WebKit::WebReferrerPolicy ResourceRequestInfoImpl::GetReferrerPolicy() const { | 163 WebKit::WebReferrerPolicy ResourceRequestInfoImpl::GetReferrerPolicy() const { |
163 return referrer_policy_; | 164 return referrer_policy_; |
164 } | 165 } |
165 | 166 |
166 bool ResourceRequestInfoImpl::HasUserGesture() const { | 167 bool ResourceRequestInfoImpl::HasUserGesture() const { |
167 return has_user_gesture_; | 168 return has_user_gesture_; |
168 } | 169 } |
169 | 170 |
| 171 bool ResourceRequestInfoImpl::WasIgnoredByHandler() const { |
| 172 return was_ignored_by_handler_; |
| 173 } |
| 174 |
170 bool ResourceRequestInfoImpl::GetAssociatedRenderView( | 175 bool ResourceRequestInfoImpl::GetAssociatedRenderView( |
171 int* render_process_id, | 176 int* render_process_id, |
172 int* render_view_id) const { | 177 int* render_view_id) const { |
173 // If the request is from the worker process, find a content that owns the | 178 // If the request is from the worker process, find a content that owns the |
174 // worker. | 179 // worker. |
175 if (process_type_ == PROCESS_TYPE_WORKER) { | 180 if (process_type_ == PROCESS_TYPE_WORKER) { |
176 // Need to display some related UI for this network request - pick an | 181 // Need to display some related UI for this network request - pick an |
177 // arbitrary parent to do so. | 182 // arbitrary parent to do so. |
178 if (!WorkerServiceImpl::GetInstance()->GetRendererForWorker( | 183 if (!WorkerServiceImpl::GetInstance()->GetRendererForWorker( |
179 child_id_, render_process_id, render_view_id)) { | 184 child_id_, render_process_id, render_view_id)) { |
(...skipping 22 matching lines...) Expand all Loading... |
202 GlobalRequestID ResourceRequestInfoImpl::GetGlobalRequestID() const { | 207 GlobalRequestID ResourceRequestInfoImpl::GetGlobalRequestID() const { |
203 return GlobalRequestID(child_id_, request_id_); | 208 return GlobalRequestID(child_id_, request_id_); |
204 } | 209 } |
205 | 210 |
206 void ResourceRequestInfoImpl::set_requested_blob_data( | 211 void ResourceRequestInfoImpl::set_requested_blob_data( |
207 webkit_blob::BlobData* data) { | 212 webkit_blob::BlobData* data) { |
208 requested_blob_data_ = data; | 213 requested_blob_data_ = data; |
209 } | 214 } |
210 | 215 |
211 } // namespace content | 216 } // namespace content |
OLD | NEW |