blob: aa763358da0cd6e216bfc73f516273b091b24afd [file] [log] [blame]
[email protected]80744782012-05-04 01:47:001// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]418da612011-07-21 19:01:522// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]541b7b02013-06-07 00:59:345#include "content/child/request_extra_data.h"
[email protected]418da612011-07-21 19:01:526
tyoshino3191d5fe42016-09-21 07:28:057#include "content/common/resource_request.h"
[email protected]354ce192014-03-25 21:35:008#include "content/common/service_worker/service_worker_types.h"
9#include "ipc/ipc_message.h"
10
[email protected]180ef242013-11-07 06:50:4611using blink::WebString;
[email protected]537fbe02011-11-24 00:58:0612
[email protected]130757672012-10-24 00:26:1913namespace content {
14
[email protected]354ce192014-03-25 21:35:0015RequestExtraData::RequestExtraData()
Blink Reformat1c4d759e2017-04-09 16:34:5416 : visibility_state_(blink::kWebPageVisibilityStateVisible),
[email protected]354ce192014-03-25 21:35:0017 render_frame_id_(MSG_ROUTING_NONE),
[email protected]ca7a275f2014-03-31 22:17:2918 is_main_frame_(false),
[email protected]354ce192014-03-25 21:35:0019 parent_is_main_frame_(false),
20 parent_render_frame_id_(-1),
21 allow_download_(true),
Sylvain Defresnec6ccc77d2014-09-19 10:19:3522 transition_type_(ui::PAGE_TRANSITION_LINK),
[email protected]354ce192014-03-25 21:35:0023 should_replace_current_entry_(false),
24 transferred_request_child_id_(-1),
25 transferred_request_request_id_(-1),
megjablond5ac7d52015-10-22 23:56:1226 service_worker_provider_id_(kInvalidServiceWorkerProviderId),
timvolodine839f0eb2016-02-19 20:01:5527 originated_from_service_worker_(false),
droger308308a2016-09-12 12:38:5028 initiated_in_secure_context_(false),
29 is_prefetch_(false),
carlosk709f33f2017-01-11 18:44:1230 download_to_network_cache_only_(false),
anantafce540a2017-01-26 21:53:0731 block_mixed_plugin_content_(false),
jam9380ddb2017-05-05 22:51:1032 navigation_initiated_by_renderer_(false),
33 url_loader_factory_override_(nullptr) {}
[email protected]d88bf0a2011-08-30 23:55:5734
35RequestExtraData::~RequestExtraData() {
[email protected]418da612011-07-21 19:01:5236}
[email protected]130757672012-10-24 00:26:1937
tyoshino3191d5fe42016-09-21 07:28:0538void RequestExtraData::CopyToResourceRequest(ResourceRequest* request) const {
39 request->visibility_state = visibility_state_;
40 request->render_frame_id = render_frame_id_;
41 request->is_main_frame = is_main_frame_;
42
43 request->parent_is_main_frame = parent_is_main_frame_;
44 request->parent_render_frame_id = parent_render_frame_id_;
45 request->allow_download = allow_download_;
46 request->transition_type = transition_type_;
47 request->should_replace_current_entry = should_replace_current_entry_;
48 request->transferred_request_child_id = transferred_request_child_id_;
49 request->transferred_request_request_id = transferred_request_request_id_;
50 request->service_worker_provider_id = service_worker_provider_id_;
51 request->originated_from_service_worker = originated_from_service_worker_;
52
53 request->initiated_in_secure_context = initiated_in_secure_context_;
54 request->download_to_network_cache_only = download_to_network_cache_only_;
55}
56
[email protected]130757672012-10-24 00:26:1957} // namespace content