| 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/browser_side_navigation_policy.h" | 10 #include "content/public/common/browser_side_navigation_policy.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 : headers(headers), | 95 : headers(headers), |
| 96 load_flags(load_flags), | 96 load_flags(load_flags), |
| 97 has_user_gesture(has_user_gesture), | 97 has_user_gesture(has_user_gesture), |
| 98 skip_service_worker(skip_service_worker), | 98 skip_service_worker(skip_service_worker), |
| 99 request_context_type(request_context_type) {} | 99 request_context_type(request_context_type) {} |
| 100 | 100 |
| 101 BeginNavigationParams::BeginNavigationParams( | 101 BeginNavigationParams::BeginNavigationParams( |
| 102 const BeginNavigationParams& other) = default; | 102 const BeginNavigationParams& other) = default; |
| 103 | 103 |
| 104 StartNavigationParams::StartNavigationParams() | 104 StartNavigationParams::StartNavigationParams() |
| 105 : | 105 : transferred_request_child_id(-1), |
| 106 #if defined(OS_ANDROID) | |
| 107 has_user_gesture(false), | |
| 108 #endif | |
| 109 transferred_request_child_id(-1), | |
| 110 transferred_request_request_id(-1) { | 106 transferred_request_request_id(-1) { |
| 111 } | 107 } |
| 112 | 108 |
| 113 StartNavigationParams::StartNavigationParams( | 109 StartNavigationParams::StartNavigationParams( |
| 114 const std::string& extra_headers, | 110 const std::string& extra_headers, |
| 115 #if defined(OS_ANDROID) | |
| 116 bool has_user_gesture, | |
| 117 #endif | |
| 118 int transferred_request_child_id, | 111 int transferred_request_child_id, |
| 119 int transferred_request_request_id) | 112 int transferred_request_request_id) |
| 120 : extra_headers(extra_headers), | 113 : extra_headers(extra_headers), |
| 121 #if defined(OS_ANDROID) | |
| 122 has_user_gesture(has_user_gesture), | |
| 123 #endif | |
| 124 transferred_request_child_id(transferred_request_child_id), | 114 transferred_request_child_id(transferred_request_child_id), |
| 125 transferred_request_request_id(transferred_request_request_id) { | 115 transferred_request_request_id(transferred_request_request_id) { |
| 126 } | 116 } |
| 127 | 117 |
| 128 StartNavigationParams::StartNavigationParams( | 118 StartNavigationParams::StartNavigationParams( |
| 129 const StartNavigationParams& other) = default; | 119 const StartNavigationParams& other) = default; |
| 130 | 120 |
| 131 StartNavigationParams::~StartNavigationParams() { | 121 StartNavigationParams::~StartNavigationParams() { |
| 132 } | 122 } |
| 133 | 123 |
| 134 RequestNavigationParams::RequestNavigationParams() | 124 RequestNavigationParams::RequestNavigationParams() |
| 135 : is_overriding_user_agent(false), | 125 : is_overriding_user_agent(false), |
| 136 can_load_local_resources(false), | 126 can_load_local_resources(false), |
| 137 request_time(base::Time::Now()), | 127 request_time(base::Time::Now()), |
| 138 page_id(-1), | 128 page_id(-1), |
| 139 nav_entry_id(0), | 129 nav_entry_id(0), |
| 140 is_same_document_history_load(false), | 130 is_same_document_history_load(false), |
| 141 is_history_navigation_in_new_child(false), | 131 is_history_navigation_in_new_child(false), |
| 142 has_subtree_history_items(false), | 132 has_subtree_history_items(false), |
| 143 has_committed_real_load(false), | 133 has_committed_real_load(false), |
| 144 intended_as_new_entry(false), | 134 intended_as_new_entry(false), |
| 145 pending_history_list_offset(-1), | 135 pending_history_list_offset(-1), |
| 146 current_history_list_offset(-1), | 136 current_history_list_offset(-1), |
| 147 current_history_list_length(0), | 137 current_history_list_length(0), |
| 148 is_view_source(false), | 138 is_view_source(false), |
| 149 should_clear_history_list(false), | 139 should_clear_history_list(false), |
| 150 should_create_service_worker(false), | 140 should_create_service_worker(false), |
| 151 service_worker_provider_id(kInvalidServiceWorkerProviderId) {} | 141 service_worker_provider_id(kInvalidServiceWorkerProviderId), |
| 142 has_user_gesture(false) {} |
| 152 | 143 |
| 153 RequestNavigationParams::RequestNavigationParams( | 144 RequestNavigationParams::RequestNavigationParams( |
| 154 bool is_overriding_user_agent, | 145 bool is_overriding_user_agent, |
| 155 const std::vector<GURL>& redirects, | 146 const std::vector<GURL>& redirects, |
| 156 bool can_load_local_resources, | 147 bool can_load_local_resources, |
| 157 base::Time request_time, | 148 base::Time request_time, |
| 158 const PageState& page_state, | 149 const PageState& page_state, |
| 159 int32_t page_id, | 150 int32_t page_id, |
| 160 int nav_entry_id, | 151 int nav_entry_id, |
| 161 bool is_same_document_history_load, | 152 bool is_same_document_history_load, |
| 162 bool is_history_navigation_in_new_child, | 153 bool is_history_navigation_in_new_child, |
| 163 bool has_subtree_history_items, | 154 bool has_subtree_history_items, |
| 164 bool has_committed_real_load, | 155 bool has_committed_real_load, |
| 165 bool intended_as_new_entry, | 156 bool intended_as_new_entry, |
| 166 int pending_history_list_offset, | 157 int pending_history_list_offset, |
| 167 int current_history_list_offset, | 158 int current_history_list_offset, |
| 168 int current_history_list_length, | 159 int current_history_list_length, |
| 169 bool is_view_source, | 160 bool is_view_source, |
| 170 bool should_clear_history_list) | 161 bool should_clear_history_list, |
| 162 bool has_user_gesture) |
| 171 : is_overriding_user_agent(is_overriding_user_agent), | 163 : is_overriding_user_agent(is_overriding_user_agent), |
| 172 redirects(redirects), | 164 redirects(redirects), |
| 173 can_load_local_resources(can_load_local_resources), | 165 can_load_local_resources(can_load_local_resources), |
| 174 request_time(request_time), | 166 request_time(request_time), |
| 175 page_state(page_state), | 167 page_state(page_state), |
| 176 page_id(page_id), | 168 page_id(page_id), |
| 177 nav_entry_id(nav_entry_id), | 169 nav_entry_id(nav_entry_id), |
| 178 is_same_document_history_load(is_same_document_history_load), | 170 is_same_document_history_load(is_same_document_history_load), |
| 179 is_history_navigation_in_new_child(is_history_navigation_in_new_child), | 171 is_history_navigation_in_new_child(is_history_navigation_in_new_child), |
| 180 has_subtree_history_items(has_subtree_history_items), | 172 has_subtree_history_items(has_subtree_history_items), |
| 181 has_committed_real_load(has_committed_real_load), | 173 has_committed_real_load(has_committed_real_load), |
| 182 intended_as_new_entry(intended_as_new_entry), | 174 intended_as_new_entry(intended_as_new_entry), |
| 183 pending_history_list_offset(pending_history_list_offset), | 175 pending_history_list_offset(pending_history_list_offset), |
| 184 current_history_list_offset(current_history_list_offset), | 176 current_history_list_offset(current_history_list_offset), |
| 185 current_history_list_length(current_history_list_length), | 177 current_history_list_length(current_history_list_length), |
| 186 is_view_source(is_view_source), | 178 is_view_source(is_view_source), |
| 187 should_clear_history_list(should_clear_history_list), | 179 should_clear_history_list(should_clear_history_list), |
| 188 should_create_service_worker(false), | 180 should_create_service_worker(false), |
| 189 service_worker_provider_id(kInvalidServiceWorkerProviderId) {} | 181 service_worker_provider_id(kInvalidServiceWorkerProviderId), |
| 182 has_user_gesture(has_user_gesture) {} |
| 190 | 183 |
| 191 RequestNavigationParams::RequestNavigationParams( | 184 RequestNavigationParams::RequestNavigationParams( |
| 192 const RequestNavigationParams& other) = default; | 185 const RequestNavigationParams& other) = default; |
| 193 | 186 |
| 194 RequestNavigationParams::~RequestNavigationParams() { | 187 RequestNavigationParams::~RequestNavigationParams() { |
| 195 } | 188 } |
| 196 | 189 |
| 197 NavigationParams::NavigationParams( | 190 NavigationParams::NavigationParams( |
| 198 const CommonNavigationParams& common_params, | 191 const CommonNavigationParams& common_params, |
| 199 const StartNavigationParams& start_params, | 192 const StartNavigationParams& start_params, |
| 200 const RequestNavigationParams& request_params) | 193 const RequestNavigationParams& request_params) |
| 201 : common_params(common_params), | 194 : common_params(common_params), |
| 202 start_params(start_params), | 195 start_params(start_params), |
| 203 request_params(request_params) { | 196 request_params(request_params) { |
| 204 } | 197 } |
| 205 | 198 |
| 206 NavigationParams::~NavigationParams() { | 199 NavigationParams::~NavigationParams() { |
| 207 } | 200 } |
| 208 | 201 |
| 209 } // namespace content | 202 } // namespace content |
| OLD | NEW |