| 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/child/request_extra_data.h" | 5 #include "content/child/request_extra_data.h" |
| 6 | 6 |
| 7 #include "content/common/resource_request.h" |
| 7 #include "content/common/service_worker/service_worker_types.h" | 8 #include "content/common/service_worker/service_worker_types.h" |
| 8 #include "ipc/ipc_message.h" | 9 #include "ipc/ipc_message.h" |
| 9 | 10 |
| 10 using blink::WebString; | 11 using blink::WebString; |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 14 RequestExtraData::RequestExtraData() | 15 RequestExtraData::RequestExtraData() |
| 15 : visibility_state_(blink::WebPageVisibilityStateVisible), | 16 : visibility_state_(blink::WebPageVisibilityStateVisible), |
| 16 render_frame_id_(MSG_ROUTING_NONE), | 17 render_frame_id_(MSG_ROUTING_NONE), |
| 17 is_main_frame_(false), | 18 is_main_frame_(false), |
| 18 parent_is_main_frame_(false), | 19 parent_is_main_frame_(false), |
| 19 parent_render_frame_id_(-1), | 20 parent_render_frame_id_(-1), |
| 20 allow_download_(true), | 21 allow_download_(true), |
| 21 transition_type_(ui::PAGE_TRANSITION_LINK), | 22 transition_type_(ui::PAGE_TRANSITION_LINK), |
| 22 should_replace_current_entry_(false), | 23 should_replace_current_entry_(false), |
| 23 transferred_request_child_id_(-1), | 24 transferred_request_child_id_(-1), |
| 24 transferred_request_request_id_(-1), | 25 transferred_request_request_id_(-1), |
| 25 service_worker_provider_id_(kInvalidServiceWorkerProviderId), | 26 service_worker_provider_id_(kInvalidServiceWorkerProviderId), |
| 26 originated_from_service_worker_(false), | 27 originated_from_service_worker_(false), |
| 27 initiated_in_secure_context_(false), | 28 initiated_in_secure_context_(false), |
| 28 is_prefetch_(false), | 29 is_prefetch_(false), |
| 29 download_to_network_cache_only_(false) {} | 30 download_to_network_cache_only_(false) {} |
| 30 | 31 |
| 31 RequestExtraData::~RequestExtraData() { | 32 RequestExtraData::~RequestExtraData() { |
| 32 } | 33 } |
| 33 | 34 |
| 35 void RequestExtraData::CopyToResourceRequest(ResourceRequest* request) const { |
| 36 request->visibility_state = visibility_state_; |
| 37 request->render_frame_id = render_frame_id_; |
| 38 request->is_main_frame = is_main_frame_; |
| 39 |
| 40 request->parent_is_main_frame = parent_is_main_frame_; |
| 41 request->parent_render_frame_id = parent_render_frame_id_; |
| 42 request->allow_download = allow_download_; |
| 43 request->transition_type = transition_type_; |
| 44 request->should_replace_current_entry = should_replace_current_entry_; |
| 45 request->transferred_request_child_id = transferred_request_child_id_; |
| 46 request->transferred_request_request_id = transferred_request_request_id_; |
| 47 request->service_worker_provider_id = service_worker_provider_id_; |
| 48 request->originated_from_service_worker = originated_from_service_worker_; |
| 49 |
| 50 request->initiated_in_secure_context = initiated_in_secure_context_; |
| 51 request->download_to_network_cache_only = download_to_network_cache_only_; |
| 52 } |
| 53 |
| 34 } // namespace content | 54 } // namespace content |
| OLD | NEW |