Chromium Code Reviews| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 } | 74 } |
| 75 | 75 |
| 76 CommonNavigationParams::CommonNavigationParams( | 76 CommonNavigationParams::CommonNavigationParams( |
| 77 const CommonNavigationParams& other) = default; | 77 const CommonNavigationParams& other) = default; |
| 78 | 78 |
| 79 CommonNavigationParams::~CommonNavigationParams() { | 79 CommonNavigationParams::~CommonNavigationParams() { |
| 80 } | 80 } |
| 81 | 81 |
| 82 BeginNavigationParams::BeginNavigationParams() | 82 BeginNavigationParams::BeginNavigationParams() |
| 83 : load_flags(0), | 83 : load_flags(0), |
| 84 has_user_gesture(false), | 84 gesture(NavigationGestureAuto), |
|
Bryan McQuade
2016/11/19 20:21:39
should this default to NavigationGestureAuto or Na
clamy
2016/11/21 16:50:46
I'd say NavigationGestureUnknown.
Bryan McQuade
2016/11/22 14:13:03
Done (in CommonNavParams)
| |
| 85 skip_service_worker(false), | 85 skip_service_worker(false), |
| 86 request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {} | 86 request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {} |
| 87 | 87 |
| 88 BeginNavigationParams::BeginNavigationParams( | 88 BeginNavigationParams::BeginNavigationParams( |
| 89 std::string headers, | 89 std::string headers, |
| 90 int load_flags, | 90 int load_flags, |
| 91 bool has_user_gesture, | 91 NavigationGesture gesture, |
| 92 bool skip_service_worker, | 92 bool skip_service_worker, |
| 93 RequestContextType request_context_type) | 93 RequestContextType request_context_type) |
| 94 : headers(headers), | 94 : headers(headers), |
| 95 load_flags(load_flags), | 95 load_flags(load_flags), |
| 96 has_user_gesture(has_user_gesture), | 96 gesture(gesture), |
| 97 skip_service_worker(skip_service_worker), | 97 skip_service_worker(skip_service_worker), |
| 98 request_context_type(request_context_type) {} | 98 request_context_type(request_context_type) {} |
| 99 | 99 |
| 100 BeginNavigationParams::BeginNavigationParams( | 100 BeginNavigationParams::BeginNavigationParams( |
| 101 const BeginNavigationParams& other) = default; | 101 const BeginNavigationParams& other) = default; |
| 102 | 102 |
| 103 StartNavigationParams::StartNavigationParams() | 103 StartNavigationParams::StartNavigationParams() |
| 104 : transferred_request_child_id(-1), | 104 : transferred_request_child_id(-1), |
| 105 transferred_request_request_id(-1) { | 105 transferred_request_request_id(-1) { |
| 106 } | 106 } |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 128 is_history_navigation_in_new_child(false), | 128 is_history_navigation_in_new_child(false), |
| 129 has_committed_real_load(false), | 129 has_committed_real_load(false), |
| 130 intended_as_new_entry(false), | 130 intended_as_new_entry(false), |
| 131 pending_history_list_offset(-1), | 131 pending_history_list_offset(-1), |
| 132 current_history_list_offset(-1), | 132 current_history_list_offset(-1), |
| 133 current_history_list_length(0), | 133 current_history_list_length(0), |
| 134 is_view_source(false), | 134 is_view_source(false), |
| 135 should_clear_history_list(false), | 135 should_clear_history_list(false), |
| 136 should_create_service_worker(false), | 136 should_create_service_worker(false), |
| 137 service_worker_provider_id(kInvalidServiceWorkerProviderId), | 137 service_worker_provider_id(kInvalidServiceWorkerProviderId), |
| 138 has_user_gesture(false) {} | 138 gesture(NavigationGestureAuto) {} |
|
Bryan McQuade
2016/11/19 20:21:39
same - auto or unknown here?
clamy
2016/11/21 16:50:46
See comment below.
Bryan McQuade
2016/11/22 14:13:03
Done
| |
| 139 | 139 |
| 140 RequestNavigationParams::RequestNavigationParams( | 140 RequestNavigationParams::RequestNavigationParams( |
| 141 bool is_overriding_user_agent, | 141 bool is_overriding_user_agent, |
| 142 const std::vector<GURL>& redirects, | 142 const std::vector<GURL>& redirects, |
| 143 bool can_load_local_resources, | 143 bool can_load_local_resources, |
| 144 const PageState& page_state, | 144 const PageState& page_state, |
| 145 int nav_entry_id, | 145 int nav_entry_id, |
| 146 bool is_same_document_history_load, | 146 bool is_same_document_history_load, |
| 147 bool is_history_navigation_in_new_child, | 147 bool is_history_navigation_in_new_child, |
| 148 std::map<std::string, bool> subframe_unique_names, | 148 std::map<std::string, bool> subframe_unique_names, |
| 149 bool has_committed_real_load, | 149 bool has_committed_real_load, |
| 150 bool intended_as_new_entry, | 150 bool intended_as_new_entry, |
| 151 int pending_history_list_offset, | 151 int pending_history_list_offset, |
| 152 int current_history_list_offset, | 152 int current_history_list_offset, |
| 153 int current_history_list_length, | 153 int current_history_list_length, |
| 154 bool is_view_source, | 154 bool is_view_source, |
| 155 bool should_clear_history_list, | 155 bool should_clear_history_list, |
| 156 bool has_user_gesture) | 156 NavigationGesture gesture) |
|
clamy
2016/11/21 16:50:46
Since it seems it is both used in RequestNavigatio
Bryan McQuade
2016/11/22 14:13:03
Ah, sure, done.
| |
| 157 : is_overriding_user_agent(is_overriding_user_agent), | 157 : is_overriding_user_agent(is_overriding_user_agent), |
| 158 redirects(redirects), | 158 redirects(redirects), |
| 159 can_load_local_resources(can_load_local_resources), | 159 can_load_local_resources(can_load_local_resources), |
| 160 page_state(page_state), | 160 page_state(page_state), |
| 161 nav_entry_id(nav_entry_id), | 161 nav_entry_id(nav_entry_id), |
| 162 is_same_document_history_load(is_same_document_history_load), | 162 is_same_document_history_load(is_same_document_history_load), |
| 163 is_history_navigation_in_new_child(is_history_navigation_in_new_child), | 163 is_history_navigation_in_new_child(is_history_navigation_in_new_child), |
| 164 subframe_unique_names(subframe_unique_names), | 164 subframe_unique_names(subframe_unique_names), |
| 165 has_committed_real_load(has_committed_real_load), | 165 has_committed_real_load(has_committed_real_load), |
| 166 intended_as_new_entry(intended_as_new_entry), | 166 intended_as_new_entry(intended_as_new_entry), |
| 167 pending_history_list_offset(pending_history_list_offset), | 167 pending_history_list_offset(pending_history_list_offset), |
| 168 current_history_list_offset(current_history_list_offset), | 168 current_history_list_offset(current_history_list_offset), |
| 169 current_history_list_length(current_history_list_length), | 169 current_history_list_length(current_history_list_length), |
| 170 is_view_source(is_view_source), | 170 is_view_source(is_view_source), |
| 171 should_clear_history_list(should_clear_history_list), | 171 should_clear_history_list(should_clear_history_list), |
| 172 should_create_service_worker(false), | 172 should_create_service_worker(false), |
| 173 service_worker_provider_id(kInvalidServiceWorkerProviderId), | 173 service_worker_provider_id(kInvalidServiceWorkerProviderId), |
| 174 has_user_gesture(has_user_gesture) {} | 174 gesture(gesture) {} |
| 175 | 175 |
| 176 RequestNavigationParams::RequestNavigationParams( | 176 RequestNavigationParams::RequestNavigationParams( |
| 177 const RequestNavigationParams& other) = default; | 177 const RequestNavigationParams& other) = default; |
| 178 | 178 |
| 179 RequestNavigationParams::~RequestNavigationParams() { | 179 RequestNavigationParams::~RequestNavigationParams() { |
| 180 } | 180 } |
| 181 | 181 |
| 182 NavigationParams::NavigationParams( | 182 NavigationParams::NavigationParams( |
| 183 const CommonNavigationParams& common_params, | 183 const CommonNavigationParams& common_params, |
| 184 const StartNavigationParams& start_params, | 184 const StartNavigationParams& start_params, |
| 185 const RequestNavigationParams& request_params) | 185 const RequestNavigationParams& request_params) |
| 186 : common_params(common_params), | 186 : common_params(common_params), |
| 187 start_params(start_params), | 187 start_params(start_params), |
| 188 request_params(request_params) { | 188 request_params(request_params) { |
| 189 } | 189 } |
| 190 | 190 |
| 191 NavigationParams::~NavigationParams() { | 191 NavigationParams::~NavigationParams() { |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace content | 194 } // namespace content |
| OLD | NEW |