Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: content/common/navigation_params.cc

Issue 2378393002: Pass the user_gesture context in the IPC message FrameMsg_CommitNavigation to the renderer. (Closed)
Patch Set: Address review comments. Define the has_user_gesture flag in the RequestNavigationParams structure. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 is_history_navigation_in_new_child(false), 141 is_history_navigation_in_new_child(false),
142 has_subtree_history_items(false), 142 has_subtree_history_items(false),
143 has_committed_real_load(false), 143 has_committed_real_load(false),
144 intended_as_new_entry(false), 144 intended_as_new_entry(false),
145 pending_history_list_offset(-1), 145 pending_history_list_offset(-1),
146 current_history_list_offset(-1), 146 current_history_list_offset(-1),
147 current_history_list_length(0), 147 current_history_list_length(0),
148 is_view_source(false), 148 is_view_source(false),
149 should_clear_history_list(false), 149 should_clear_history_list(false),
150 should_create_service_worker(false), 150 should_create_service_worker(false),
151 service_worker_provider_id(kInvalidServiceWorkerProviderId) {} 151 service_worker_provider_id(kInvalidServiceWorkerProviderId),
152 has_user_gesture(false) {}
152 153
153 RequestNavigationParams::RequestNavigationParams( 154 RequestNavigationParams::RequestNavigationParams(
154 bool is_overriding_user_agent, 155 bool is_overriding_user_agent,
155 const std::vector<GURL>& redirects, 156 const std::vector<GURL>& redirects,
156 bool can_load_local_resources, 157 bool can_load_local_resources,
157 base::Time request_time, 158 base::Time request_time,
158 const PageState& page_state, 159 const PageState& page_state,
159 int32_t page_id, 160 int32_t page_id,
160 int nav_entry_id, 161 int nav_entry_id,
161 bool is_same_document_history_load, 162 bool is_same_document_history_load,
162 bool is_history_navigation_in_new_child, 163 bool is_history_navigation_in_new_child,
163 bool has_subtree_history_items, 164 bool has_subtree_history_items,
164 bool has_committed_real_load, 165 bool has_committed_real_load,
165 bool intended_as_new_entry, 166 bool intended_as_new_entry,
166 int pending_history_list_offset, 167 int pending_history_list_offset,
167 int current_history_list_offset, 168 int current_history_list_offset,
168 int current_history_list_length, 169 int current_history_list_length,
169 bool is_view_source, 170 bool is_view_source,
170 bool should_clear_history_list) 171 bool should_clear_history_list,
172 bool has_user_gesture)
171 : is_overriding_user_agent(is_overriding_user_agent), 173 : is_overriding_user_agent(is_overriding_user_agent),
172 redirects(redirects), 174 redirects(redirects),
173 can_load_local_resources(can_load_local_resources), 175 can_load_local_resources(can_load_local_resources),
174 request_time(request_time), 176 request_time(request_time),
175 page_state(page_state), 177 page_state(page_state),
176 page_id(page_id), 178 page_id(page_id),
177 nav_entry_id(nav_entry_id), 179 nav_entry_id(nav_entry_id),
178 is_same_document_history_load(is_same_document_history_load), 180 is_same_document_history_load(is_same_document_history_load),
179 is_history_navigation_in_new_child(is_history_navigation_in_new_child), 181 is_history_navigation_in_new_child(is_history_navigation_in_new_child),
180 has_subtree_history_items(has_subtree_history_items), 182 has_subtree_history_items(has_subtree_history_items),
181 has_committed_real_load(has_committed_real_load), 183 has_committed_real_load(has_committed_real_load),
182 intended_as_new_entry(intended_as_new_entry), 184 intended_as_new_entry(intended_as_new_entry),
183 pending_history_list_offset(pending_history_list_offset), 185 pending_history_list_offset(pending_history_list_offset),
184 current_history_list_offset(current_history_list_offset), 186 current_history_list_offset(current_history_list_offset),
185 current_history_list_length(current_history_list_length), 187 current_history_list_length(current_history_list_length),
186 is_view_source(is_view_source), 188 is_view_source(is_view_source),
187 should_clear_history_list(should_clear_history_list), 189 should_clear_history_list(should_clear_history_list),
188 should_create_service_worker(false), 190 should_create_service_worker(false),
189 service_worker_provider_id(kInvalidServiceWorkerProviderId) {} 191 service_worker_provider_id(kInvalidServiceWorkerProviderId),
192 has_user_gesture(has_user_gesture) {}
190 193
191 RequestNavigationParams::RequestNavigationParams( 194 RequestNavigationParams::RequestNavigationParams(
192 const RequestNavigationParams& other) = default; 195 const RequestNavigationParams& other) = default;
193 196
194 RequestNavigationParams::~RequestNavigationParams() { 197 RequestNavigationParams::~RequestNavigationParams() {
195 } 198 }
196 199
197 NavigationParams::NavigationParams( 200 NavigationParams::NavigationParams(
198 const CommonNavigationParams& common_params, 201 const CommonNavigationParams& common_params,
199 const StartNavigationParams& start_params, 202 const StartNavigationParams& start_params,
200 const RequestNavigationParams& request_params) 203 const RequestNavigationParams& request_params)
201 : common_params(common_params), 204 : common_params(common_params),
202 start_params(start_params), 205 start_params(start_params),
203 request_params(request_params) { 206 request_params(request_params) {
204 } 207 }
205 208
206 NavigationParams::~NavigationParams() { 209 NavigationParams::~NavigationParams() {
207 } 210 }
208 211
209 } // namespace content 212 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698