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 3366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3377 // Save these to be processed when the ensuing navigation is committed. | 3377 // Save these to be processed when the ensuing navigation is committed. |
3378 WebSearchableFormData web_searchable_form_data(form); | 3378 WebSearchableFormData web_searchable_form_data(form); |
3379 internal_data->set_searchable_form_url(web_searchable_form_data.url()); | 3379 internal_data->set_searchable_form_url(web_searchable_form_data.url()); |
3380 internal_data->set_searchable_form_encoding( | 3380 internal_data->set_searchable_form_encoding( |
3381 web_searchable_form_data.encoding().utf8()); | 3381 web_searchable_form_data.encoding().utf8()); |
3382 | 3382 |
3383 for (auto& observer : observers_) | 3383 for (auto& observer : observers_) |
3384 observer.WillSubmitForm(form); | 3384 observer.WillSubmitForm(form); |
3385 } | 3385 } |
3386 | 3386 |
3387 void RenderFrameImpl::didCreateDataSource(blink::WebLocalFrame* frame, | 3387 void RenderFrameImpl::didCreateDataSource(blink::WebDataSource* datasource) { |
3388 blink::WebDataSource* datasource) { | |
3389 DCHECK(!frame_ || frame_ == frame); | |
jochen (gone - plz use gerrit)
2017/03/30 11:43:43
this doesn't look like it's good enough to proof r
| |
3390 | |
3391 bool content_initiated = !pending_navigation_params_.get(); | 3388 bool content_initiated = !pending_navigation_params_.get(); |
3392 | 3389 |
3393 // Make sure any previous redirect URLs end up in our new data source. | 3390 // Make sure any previous redirect URLs end up in our new data source. |
3394 if (pending_navigation_params_.get() && !IsBrowserSideNavigationEnabled()) { | 3391 if (pending_navigation_params_.get() && !IsBrowserSideNavigationEnabled()) { |
3395 for (const auto& i : | 3392 for (const auto& i : |
3396 pending_navigation_params_->request_params.redirects) { | 3393 pending_navigation_params_->request_params.redirects) { |
3397 datasource->appendRedirect(i); | 3394 datasource->appendRedirect(i); |
3398 } | 3395 } |
3399 } | 3396 } |
3400 | 3397 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3472 } | 3469 } |
3473 | 3470 |
3474 // Create the serviceworker's per-document network observing object if it | 3471 // Create the serviceworker's per-document network observing object if it |
3475 // does not exist (When navigation happens within a page, the provider already | 3472 // does not exist (When navigation happens within a page, the provider already |
3476 // exists). | 3473 // exists). |
3477 if (datasource->getServiceWorkerNetworkProvider()) | 3474 if (datasource->getServiceWorkerNetworkProvider()) |
3478 return; | 3475 return; |
3479 | 3476 |
3480 datasource->setServiceWorkerNetworkProvider( | 3477 datasource->setServiceWorkerNetworkProvider( |
3481 ServiceWorkerNetworkProvider::CreateForNavigation( | 3478 ServiceWorkerNetworkProvider::CreateForNavigation( |
3482 routing_id_, navigation_state->request_params(), frame, | 3479 routing_id_, navigation_state->request_params(), frame_, |
3483 content_initiated)); | 3480 content_initiated)); |
3484 } | 3481 } |
3485 | 3482 |
3486 void RenderFrameImpl::didStartProvisionalLoad(blink::WebDataSource* data_source, | 3483 void RenderFrameImpl::didStartProvisionalLoad(blink::WebDataSource* data_source, |
3487 blink::WebURLRequest& request) { | 3484 blink::WebURLRequest& request) { |
3488 // In fast/loader/stop-provisional-loads.html, we abort the load before this | 3485 // In fast/loader/stop-provisional-loads.html, we abort the load before this |
3489 // callback is invoked. | 3486 // callback is invoked. |
3490 if (!data_source) | 3487 if (!data_source) |
3491 return; | 3488 return; |
3492 | 3489 |
(...skipping 3476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6969 policy(info.defaultPolicy), | 6966 policy(info.defaultPolicy), |
6970 replaces_current_history_item(info.replacesCurrentHistoryItem), | 6967 replaces_current_history_item(info.replacesCurrentHistoryItem), |
6971 history_navigation_in_new_child_frame( | 6968 history_navigation_in_new_child_frame( |
6972 info.isHistoryNavigationInNewChildFrame), | 6969 info.isHistoryNavigationInNewChildFrame), |
6973 client_redirect(info.isClientRedirect), | 6970 client_redirect(info.isClientRedirect), |
6974 cache_disabled(info.isCacheDisabled), | 6971 cache_disabled(info.isCacheDisabled), |
6975 form(info.form), | 6972 form(info.form), |
6976 source_location(info.sourceLocation) {} | 6973 source_location(info.sourceLocation) {} |
6977 | 6974 |
6978 } // namespace content | 6975 } // namespace content |
OLD | NEW |