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 3409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3420 if (pending_entry && pending_entry->GetUniqueID() == params.nav_entry_id) { | 3420 if (pending_entry && pending_entry->GetUniqueID() == params.nav_entry_id) { |
3421 pending_nav_entry_id = params.nav_entry_id; | 3421 pending_nav_entry_id = params.nav_entry_id; |
3422 is_renderer_initiated = pending_entry->is_renderer_initiated(); | 3422 is_renderer_initiated = pending_entry->is_renderer_initiated(); |
3423 } | 3423 } |
3424 | 3424 |
3425 return NavigationHandleImpl::Create( | 3425 return NavigationHandleImpl::Create( |
3426 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3426 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3427 params.was_within_same_page, base::TimeTicks::Now(), | 3427 params.was_within_same_page, base::TimeTicks::Now(), |
3428 pending_nav_entry_id, | 3428 pending_nav_entry_id, |
3429 false, // started_from_context_menu | 3429 false, // started_from_context_menu |
3430 false); // should_bypass_main_world_csp | 3430 false, // should_bypass_main_world_csp |
| 3431 false); // is_form_submission |
3431 } | 3432 } |
3432 | 3433 |
3433 // Determine if the current NavigationHandle can be used. | 3434 // Determine if the current NavigationHandle can be used. |
3434 if (navigation_handle_ && navigation_handle_->GetURL() == params.url) { | 3435 if (navigation_handle_ && navigation_handle_->GetURL() == params.url) { |
3435 return std::move(navigation_handle_); | 3436 return std::move(navigation_handle_); |
3436 } | 3437 } |
3437 | 3438 |
3438 // If the URL does not match what the NavigationHandle expects, treat the | 3439 // If the URL does not match what the NavigationHandle expects, treat the |
3439 // commit as a new navigation. This can happen when loading a Data | 3440 // commit as a new navigation. This can happen when loading a Data |
3440 // navigation with LoadDataWithBaseURL. | 3441 // navigation with LoadDataWithBaseURL. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3474 } | 3475 } |
3475 | 3476 |
3476 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3477 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3477 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3478 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3478 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3479 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3479 return NavigationHandleImpl::Create( | 3480 return NavigationHandleImpl::Create( |
3480 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3481 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3481 params.was_within_same_page, base::TimeTicks::Now(), | 3482 params.was_within_same_page, base::TimeTicks::Now(), |
3482 entry_id_for_data_nav, | 3483 entry_id_for_data_nav, |
3483 false, // started_from_context_menu | 3484 false, // started_from_context_menu |
3484 false); // should_bypass_main_world_csp | 3485 false, // should_bypass_main_world_csp |
| 3486 false); // is_form_submission |
3485 } | 3487 } |
3486 | 3488 |
3487 } // namespace content | 3489 } // namespace content |
OLD | NEW |