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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 3449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3460 frame_tree_node()->navigator()->GetController()->GetPendingEntry()); | 3460 frame_tree_node()->navigator()->GetController()->GetPendingEntry()); |
3461 if (pending_entry && pending_entry->GetUniqueID() == params.nav_entry_id) { | 3461 if (pending_entry && pending_entry->GetUniqueID() == params.nav_entry_id) { |
3462 pending_nav_entry_id = params.nav_entry_id; | 3462 pending_nav_entry_id = params.nav_entry_id; |
3463 is_renderer_initiated = pending_entry->is_renderer_initiated(); | 3463 is_renderer_initiated = pending_entry->is_renderer_initiated(); |
3464 } | 3464 } |
3465 | 3465 |
3466 return NavigationHandleImpl::Create( | 3466 return NavigationHandleImpl::Create( |
3467 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3467 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3468 params.was_within_same_document, base::TimeTicks::Now(), | 3468 params.was_within_same_document, base::TimeTicks::Now(), |
3469 pending_nav_entry_id, | 3469 pending_nav_entry_id, |
3470 false, // started_from_context_menu | 3470 false, // started_from_context_menu |
3471 CSPDisposition::CHECK); // should_check_main_world_csp | 3471 CSPDisposition::CHECK, // should_check_main_world_csp |
| 3472 false); // is_form_submission |
3472 } | 3473 } |
3473 | 3474 |
3474 // Determine if the current NavigationHandle can be used. | 3475 // Determine if the current NavigationHandle can be used. |
3475 if (navigation_handle_ && navigation_handle_->GetURL() == params.url) { | 3476 if (navigation_handle_ && navigation_handle_->GetURL() == params.url) { |
3476 return std::move(navigation_handle_); | 3477 return std::move(navigation_handle_); |
3477 } | 3478 } |
3478 | 3479 |
3479 // If the URL does not match what the NavigationHandle expects, treat the | 3480 // If the URL does not match what the NavigationHandle expects, treat the |
3480 // commit as a new navigation. This can happen when loading a Data | 3481 // commit as a new navigation. This can happen when loading a Data |
3481 // navigation with LoadDataWithBaseURL. | 3482 // navigation with LoadDataWithBaseURL. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3514 navigation_handle_.reset(); | 3515 navigation_handle_.reset(); |
3515 } | 3516 } |
3516 | 3517 |
3517 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3518 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3518 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3519 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3519 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3520 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3520 return NavigationHandleImpl::Create( | 3521 return NavigationHandleImpl::Create( |
3521 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3522 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3522 params.was_within_same_document, base::TimeTicks::Now(), | 3523 params.was_within_same_document, base::TimeTicks::Now(), |
3523 entry_id_for_data_nav, | 3524 entry_id_for_data_nav, |
3524 false, // started_from_context_menu | 3525 false, // started_from_context_menu |
3525 CSPDisposition::CHECK); // should_check_main_world_csp | 3526 CSPDisposition::CHECK, // should_check_main_world_csp |
| 3527 false); // is_form_submission |
3526 } | 3528 } |
3527 | 3529 |
3528 void RenderFrameHostImpl::BeforeUnloadTimeout() { | 3530 void RenderFrameHostImpl::BeforeUnloadTimeout() { |
3529 if (render_view_host_->GetDelegate()->ShouldIgnoreUnresponsiveRenderer()) | 3531 if (render_view_host_->GetDelegate()->ShouldIgnoreUnresponsiveRenderer()) |
3530 return; | 3532 return; |
3531 | 3533 |
3532 SimulateBeforeUnloadAck(); | 3534 SimulateBeforeUnloadAck(); |
3533 } | 3535 } |
3534 | 3536 |
3535 #if defined(OS_ANDROID) | 3537 #if defined(OS_ANDROID) |
(...skipping 14 matching lines...) Expand all Loading... |
3550 service_manager::mojom::InterfaceProviderPtr provider; | 3552 service_manager::mojom::InterfaceProviderPtr provider; |
3551 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); | 3553 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); |
3552 java_interfaces_.reset(new service_manager::InterfaceProvider); | 3554 java_interfaces_.reset(new service_manager::InterfaceProvider); |
3553 java_interfaces_->Bind(std::move(provider)); | 3555 java_interfaces_->Bind(std::move(provider)); |
3554 } | 3556 } |
3555 return java_interfaces_.get(); | 3557 return java_interfaces_.get(); |
3556 } | 3558 } |
3557 #endif | 3559 #endif |
3558 | 3560 |
3559 } // namespace content | 3561 } // namespace content |
OLD | NEW |