OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 6329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6340 | 6340 |
6341 int load_flags = GetLoadFlagsForWebURLRequest(info.urlRequest); | 6341 int load_flags = GetLoadFlagsForWebURLRequest(info.urlRequest); |
6342 | 6342 |
6343 // Requests initiated via devtools can have caching disabled. | 6343 // Requests initiated via devtools can have caching disabled. |
6344 if (info.isCacheDisabled) { | 6344 if (info.isCacheDisabled) { |
6345 // Turn off all caching related flags and set LOAD_BYPASS_CACHE. | 6345 // Turn off all caching related flags and set LOAD_BYPASS_CACHE. |
6346 load_flags &= ~(net::LOAD_VALIDATE_CACHE | net::LOAD_SKIP_CACHE_VALIDATION | | 6346 load_flags &= ~(net::LOAD_VALIDATE_CACHE | net::LOAD_SKIP_CACHE_VALIDATION | |
6347 net::LOAD_ONLY_FROM_CACHE | net::LOAD_DISABLE_CACHE); | 6347 net::LOAD_ONLY_FROM_CACHE | net::LOAD_DISABLE_CACHE); |
6348 load_flags |= net::LOAD_BYPASS_CACHE; | 6348 load_flags |= net::LOAD_BYPASS_CACHE; |
6349 } | 6349 } |
| 6350 |
| 6351 bool is_form_submission = |
| 6352 info.navigationType == blink::WebNavigationTypeFormSubmitted || |
| 6353 info.navigationType == blink::WebNavigationTypeFormResubmitted; |
| 6354 |
6350 BeginNavigationParams begin_navigation_params( | 6355 BeginNavigationParams begin_navigation_params( |
6351 GetWebURLRequestHeaders(info.urlRequest), load_flags, | 6356 GetWebURLRequestHeaders(info.urlRequest), load_flags, |
6352 info.urlRequest.hasUserGesture(), | 6357 info.urlRequest.hasUserGesture(), |
6353 info.urlRequest.getServiceWorkerMode() != | 6358 info.urlRequest.getServiceWorkerMode() != |
6354 blink::WebURLRequest::ServiceWorkerMode::All, | 6359 blink::WebURLRequest::ServiceWorkerMode::All, |
6355 GetRequestContextTypeForWebURLRequest(info.urlRequest), | 6360 GetRequestContextTypeForWebURLRequest(info.urlRequest), |
6356 GetMixedContentContextTypeForWebURLRequest(info.urlRequest), | 6361 GetMixedContentContextTypeForWebURLRequest(info.urlRequest), |
6357 initiator_origin); | 6362 is_form_submission, initiator_origin); |
6358 | 6363 |
6359 if (!info.form.isNull()) { | 6364 if (!info.form.isNull()) { |
6360 WebSearchableFormData web_searchable_form_data(info.form); | 6365 WebSearchableFormData web_searchable_form_data(info.form); |
6361 begin_navigation_params.searchable_form_url = | 6366 begin_navigation_params.searchable_form_url = |
6362 web_searchable_form_data.url(); | 6367 web_searchable_form_data.url(); |
6363 begin_navigation_params.searchable_form_encoding = | 6368 begin_navigation_params.searchable_form_encoding = |
6364 web_searchable_form_data.encoding().utf8(); | 6369 web_searchable_form_data.encoding().utf8(); |
6365 } | 6370 } |
6366 | 6371 |
6367 if (info.isClientRedirect) | 6372 if (info.isClientRedirect) |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6913 // event target. Potentially a Pepper plugin will receive the event. | 6918 // event target. Potentially a Pepper plugin will receive the event. |
6914 // In order to tell whether a plugin gets the last mouse event and which it | 6919 // In order to tell whether a plugin gets the last mouse event and which it |
6915 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6920 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6916 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6921 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6917 // |pepper_last_mouse_event_target_|. | 6922 // |pepper_last_mouse_event_target_|. |
6918 pepper_last_mouse_event_target_ = nullptr; | 6923 pepper_last_mouse_event_target_ = nullptr; |
6919 #endif | 6924 #endif |
6920 } | 6925 } |
6921 | 6926 |
6922 } // namespace content | 6927 } // namespace content |
OLD | NEW |