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 3424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3435 if (pending_entry && pending_entry->GetUniqueID() == params.nav_entry_id) { | 3435 if (pending_entry && pending_entry->GetUniqueID() == params.nav_entry_id) { |
3436 pending_nav_entry_id = params.nav_entry_id; | 3436 pending_nav_entry_id = params.nav_entry_id; |
3437 is_renderer_initiated = pending_entry->is_renderer_initiated(); | 3437 is_renderer_initiated = pending_entry->is_renderer_initiated(); |
3438 } | 3438 } |
3439 | 3439 |
3440 return NavigationHandleImpl::Create( | 3440 return NavigationHandleImpl::Create( |
3441 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3441 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3442 params.was_within_same_page, base::TimeTicks::Now(), | 3442 params.was_within_same_page, base::TimeTicks::Now(), |
3443 pending_nav_entry_id, | 3443 pending_nav_entry_id, |
3444 false, // started_from_context_menu | 3444 false, // started_from_context_menu |
3445 false); // should_bypass_main_world_csp | 3445 false, // should_bypass_main_world_csp |
| 3446 false); // is_form_submission |
3446 } | 3447 } |
3447 | 3448 |
3448 // Determine if the current NavigationHandle can be used. | 3449 // Determine if the current NavigationHandle can be used. |
3449 if (navigation_handle_ && navigation_handle_->GetURL() == params.url) { | 3450 if (navigation_handle_ && navigation_handle_->GetURL() == params.url) { |
3450 return std::move(navigation_handle_); | 3451 return std::move(navigation_handle_); |
3451 } | 3452 } |
3452 | 3453 |
3453 // If the URL does not match what the NavigationHandle expects, treat the | 3454 // If the URL does not match what the NavigationHandle expects, treat the |
3454 // commit as a new navigation. This can happen when loading a Data | 3455 // commit as a new navigation. This can happen when loading a Data |
3455 // navigation with LoadDataWithBaseURL. | 3456 // navigation with LoadDataWithBaseURL. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3489 } | 3490 } |
3490 | 3491 |
3491 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3492 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3492 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3493 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3493 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3494 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3494 return NavigationHandleImpl::Create( | 3495 return NavigationHandleImpl::Create( |
3495 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3496 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3496 params.was_within_same_page, base::TimeTicks::Now(), | 3497 params.was_within_same_page, base::TimeTicks::Now(), |
3497 entry_id_for_data_nav, | 3498 entry_id_for_data_nav, |
3498 false, // started_from_context_menu | 3499 false, // started_from_context_menu |
3499 false); // should_bypass_main_world_csp | 3500 false, // should_bypass_main_world_csp |
| 3501 false); // is_form_submission |
3500 } | 3502 } |
3501 | 3503 |
3502 } // namespace content | 3504 } // namespace content |
OLD | NEW |