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/browser_side_navigation_policy.h" | 11 #include "content/public/common/browser_side_navigation_policy.h" |
11 #include "content/public/common/url_constants.h" | 12 #include "content/public/common/url_constants.h" |
12 #include "url/gurl.h" | 13 #include "url/gurl.h" |
13 #include "url/url_constants.h" | 14 #include "url/url_constants.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 // PlzNavigate | 18 // PlzNavigate |
18 bool ShouldMakeNetworkRequestForURL(const GURL& url) { | 19 bool ShouldMakeNetworkRequestForURL(const GURL& url) { |
19 CHECK(IsBrowserSideNavigationEnabled()); | 20 CHECK(IsBrowserSideNavigationEnabled()); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 is_history_navigation_in_new_child(false), | 129 is_history_navigation_in_new_child(false), |
129 has_committed_real_load(false), | 130 has_committed_real_load(false), |
130 intended_as_new_entry(false), | 131 intended_as_new_entry(false), |
131 pending_history_list_offset(-1), | 132 pending_history_list_offset(-1), |
132 current_history_list_offset(-1), | 133 current_history_list_offset(-1), |
133 current_history_list_length(0), | 134 current_history_list_length(0), |
134 is_view_source(false), | 135 is_view_source(false), |
135 should_clear_history_list(false), | 136 should_clear_history_list(false), |
136 should_create_service_worker(false), | 137 should_create_service_worker(false), |
137 service_worker_provider_id(kInvalidServiceWorkerProviderId), | 138 service_worker_provider_id(kInvalidServiceWorkerProviderId), |
| 139 appcache_host_id(kAppCacheNoHostId), |
138 has_user_gesture(false) {} | 140 has_user_gesture(false) {} |
139 | 141 |
140 RequestNavigationParams::RequestNavigationParams( | 142 RequestNavigationParams::RequestNavigationParams( |
141 bool is_overriding_user_agent, | 143 bool is_overriding_user_agent, |
142 const std::vector<GURL>& redirects, | 144 const std::vector<GURL>& redirects, |
143 bool can_load_local_resources, | 145 bool can_load_local_resources, |
144 const PageState& page_state, | 146 const PageState& page_state, |
145 int nav_entry_id, | 147 int nav_entry_id, |
146 bool is_same_document_history_load, | 148 bool is_same_document_history_load, |
147 bool is_history_navigation_in_new_child, | 149 bool is_history_navigation_in_new_child, |
(...skipping 16 matching lines...) Expand all Loading... |
164 subframe_unique_names(subframe_unique_names), | 166 subframe_unique_names(subframe_unique_names), |
165 has_committed_real_load(has_committed_real_load), | 167 has_committed_real_load(has_committed_real_load), |
166 intended_as_new_entry(intended_as_new_entry), | 168 intended_as_new_entry(intended_as_new_entry), |
167 pending_history_list_offset(pending_history_list_offset), | 169 pending_history_list_offset(pending_history_list_offset), |
168 current_history_list_offset(current_history_list_offset), | 170 current_history_list_offset(current_history_list_offset), |
169 current_history_list_length(current_history_list_length), | 171 current_history_list_length(current_history_list_length), |
170 is_view_source(is_view_source), | 172 is_view_source(is_view_source), |
171 should_clear_history_list(should_clear_history_list), | 173 should_clear_history_list(should_clear_history_list), |
172 should_create_service_worker(false), | 174 should_create_service_worker(false), |
173 service_worker_provider_id(kInvalidServiceWorkerProviderId), | 175 service_worker_provider_id(kInvalidServiceWorkerProviderId), |
| 176 appcache_host_id(kAppCacheNoHostId), |
174 has_user_gesture(has_user_gesture) {} | 177 has_user_gesture(has_user_gesture) {} |
175 | 178 |
176 RequestNavigationParams::RequestNavigationParams( | 179 RequestNavigationParams::RequestNavigationParams( |
177 const RequestNavigationParams& other) = default; | 180 const RequestNavigationParams& other) = default; |
178 | 181 |
179 RequestNavigationParams::~RequestNavigationParams() { | 182 RequestNavigationParams::~RequestNavigationParams() { |
180 } | 183 } |
181 | 184 |
182 NavigationParams::NavigationParams( | 185 NavigationParams::NavigationParams( |
183 const CommonNavigationParams& common_params, | 186 const CommonNavigationParams& common_params, |
184 const StartNavigationParams& start_params, | 187 const StartNavigationParams& start_params, |
185 const RequestNavigationParams& request_params) | 188 const RequestNavigationParams& request_params) |
186 : common_params(common_params), | 189 : common_params(common_params), |
187 start_params(start_params), | 190 start_params(start_params), |
188 request_params(request_params) { | 191 request_params(request_params) { |
189 } | 192 } |
190 | 193 |
191 NavigationParams::~NavigationParams() { | 194 NavigationParams::~NavigationParams() { |
192 } | 195 } |
193 | 196 |
194 } // namespace content | 197 } // namespace content |
OLD | NEW |