OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/navigation_params.h" | 5 #include "content/common/navigation_params.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "content/common/service_worker/service_worker_types.h" | 9 #include "content/common/service_worker/service_worker_types.h" |
10 #include "content/public/common/appcache_info.h" | 10 #include "content/public/common/appcache_info.h" |
11 #include "content/public/common/browser_side_navigation_policy.h" | 11 #include "content/public/common/browser_side_navigation_policy.h" |
12 #include "content/public/common/url_constants.h" | 12 #include "content/public/common/url_constants.h" |
| 13 #include "third_party/WebKit/public/platform/WebMixedContentContextType.h" |
13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
14 #include "url/url_constants.h" | 15 #include "url/url_constants.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 // PlzNavigate | 19 // PlzNavigate |
19 bool ShouldMakeNetworkRequestForURL(const GURL& url) { | 20 bool ShouldMakeNetworkRequestForURL(const GURL& url) { |
20 CHECK(IsBrowserSideNavigationEnabled()); | 21 CHECK(IsBrowserSideNavigationEnabled()); |
21 | 22 |
22 // Javascript URLs, about:blank, srcdoc should not send a request | 23 // Javascript URLs, about:blank, srcdoc should not send a request |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 CommonNavigationParams::CommonNavigationParams( | 78 CommonNavigationParams::CommonNavigationParams( |
78 const CommonNavigationParams& other) = default; | 79 const CommonNavigationParams& other) = default; |
79 | 80 |
80 CommonNavigationParams::~CommonNavigationParams() { | 81 CommonNavigationParams::~CommonNavigationParams() { |
81 } | 82 } |
82 | 83 |
83 BeginNavigationParams::BeginNavigationParams() | 84 BeginNavigationParams::BeginNavigationParams() |
84 : load_flags(0), | 85 : load_flags(0), |
85 has_user_gesture(false), | 86 has_user_gesture(false), |
86 skip_service_worker(false), | 87 skip_service_worker(false), |
87 request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {} | 88 request_context_type(REQUEST_CONTEXT_TYPE_LOCATION), |
| 89 mixed_content_context_type(blink::WebMixedContentContextType::Blockable) { |
| 90 } |
88 | 91 |
89 BeginNavigationParams::BeginNavigationParams( | 92 BeginNavigationParams::BeginNavigationParams( |
90 std::string headers, | 93 std::string headers, |
91 int load_flags, | 94 int load_flags, |
92 bool has_user_gesture, | 95 bool has_user_gesture, |
93 bool skip_service_worker, | 96 bool skip_service_worker, |
94 RequestContextType request_context_type, | 97 RequestContextType request_context_type, |
| 98 blink::WebMixedContentContextType mixed_content_context_type, |
95 const base::Optional<url::Origin>& initiator_origin) | 99 const base::Optional<url::Origin>& initiator_origin) |
96 : headers(headers), | 100 : headers(headers), |
97 load_flags(load_flags), | 101 load_flags(load_flags), |
98 has_user_gesture(has_user_gesture), | 102 has_user_gesture(has_user_gesture), |
99 skip_service_worker(skip_service_worker), | 103 skip_service_worker(skip_service_worker), |
100 request_context_type(request_context_type), | 104 request_context_type(request_context_type), |
| 105 mixed_content_context_type(mixed_content_context_type), |
101 initiator_origin(initiator_origin) {} | 106 initiator_origin(initiator_origin) {} |
102 | 107 |
103 BeginNavigationParams::BeginNavigationParams( | 108 BeginNavigationParams::BeginNavigationParams( |
104 const BeginNavigationParams& other) = default; | 109 const BeginNavigationParams& other) = default; |
105 | 110 |
106 BeginNavigationParams::~BeginNavigationParams() {} | 111 BeginNavigationParams::~BeginNavigationParams() {} |
107 | 112 |
108 StartNavigationParams::StartNavigationParams() | 113 StartNavigationParams::StartNavigationParams() |
109 : transferred_request_child_id(-1), | 114 : transferred_request_child_id(-1), |
110 transferred_request_request_id(-1) { | 115 transferred_request_request_id(-1) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 const RequestNavigationParams& request_params) | 199 const RequestNavigationParams& request_params) |
195 : common_params(common_params), | 200 : common_params(common_params), |
196 start_params(start_params), | 201 start_params(start_params), |
197 request_params(request_params) { | 202 request_params(request_params) { |
198 } | 203 } |
199 | 204 |
200 NavigationParams::~NavigationParams() { | 205 NavigationParams::~NavigationParams() { |
201 } | 206 } |
202 | 207 |
203 } // namespace content | 208 } // namespace content |
OLD | NEW |