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/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_number_conversions.h" // Temporary | 10 #include "base/strings/string_number_conversions.h" // Temporary |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 } | 680 } |
681 | 681 |
682 NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry( | 682 NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry( |
683 CreateNavigationEntry( | 683 CreateNavigationEntry( |
684 params.url, | 684 params.url, |
685 params.referrer, | 685 params.referrer, |
686 params.transition_type, | 686 params.transition_type, |
687 params.is_renderer_initiated, | 687 params.is_renderer_initiated, |
688 params.extra_headers, | 688 params.extra_headers, |
689 browser_context_)); | 689 browser_context_)); |
| 690 if (params.frame_tree_node_id != -1) |
| 691 entry->set_frame_tree_node_id(params.frame_tree_node_id); |
690 if (params.redirect_chain.size() > 0) | 692 if (params.redirect_chain.size() > 0) |
691 entry->set_redirect_chain(params.redirect_chain); | 693 entry->set_redirect_chain(params.redirect_chain); |
692 if (params.should_replace_current_entry) | 694 if (params.should_replace_current_entry) |
693 entry->set_should_replace_entry(true); | 695 entry->set_should_replace_entry(true); |
694 entry->set_should_clear_history_list(params.should_clear_history_list); | 696 entry->set_should_clear_history_list(params.should_clear_history_list); |
695 entry->SetIsOverridingUserAgent(override); | 697 entry->SetIsOverridingUserAgent(override); |
696 entry->set_transferred_global_request_id( | 698 entry->set_transferred_global_request_id( |
697 params.transferred_global_request_id); | 699 params.transferred_global_request_id); |
698 entry->SetFrameToNavigate(params.frame_name); | 700 entry->SetFrameToNavigate(params.frame_name); |
699 | 701 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 NavigationEntryImpl::FromNavigationEntry(GetLastCommittedEntry()); | 809 NavigationEntryImpl::FromNavigationEntry(GetLastCommittedEntry()); |
808 active_entry->SetTimestamp(timestamp); | 810 active_entry->SetTimestamp(timestamp); |
809 active_entry->SetHttpStatusCode(params.http_status_code); | 811 active_entry->SetHttpStatusCode(params.http_status_code); |
810 active_entry->SetPageState(params.page_state); | 812 active_entry->SetPageState(params.page_state); |
811 | 813 |
812 // Once it is committed, we no longer need to track several pieces of state on | 814 // Once it is committed, we no longer need to track several pieces of state on |
813 // the entry. | 815 // the entry. |
814 active_entry->ResetForCommit(); | 816 active_entry->ResetForCommit(); |
815 | 817 |
816 // The active entry's SiteInstance should match our SiteInstance. | 818 // The active entry's SiteInstance should match our SiteInstance. |
817 CHECK(active_entry->site_instance() == delegate_->GetSiteInstance()); | 819 //CHECK(active_entry->site_instance() == delegate_->GetSiteInstance()); |
818 | 820 |
819 // Remember the bindings the renderer process has at this point, so that | 821 // Remember the bindings the renderer process has at this point, so that |
820 // we do not grant this entry additional bindings if we come back to it. | 822 // we do not grant this entry additional bindings if we come back to it. |
821 active_entry->SetBindings( | 823 active_entry->SetBindings( |
822 delegate_->GetRenderViewHost()->GetEnabledBindings()); | 824 delegate_->GetRenderViewHost()->GetEnabledBindings()); |
823 | 825 |
824 // Now prep the rest of the details for the notification and broadcast. | 826 // Now prep the rest of the details for the notification and broadcast. |
825 details->entry = active_entry; | 827 details->entry = active_entry; |
826 details->is_main_frame = | 828 details->is_main_frame = |
827 PageTransitionIsMainFrame(params.transition); | 829 PageTransitionIsMainFrame(params.transition); |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 } | 1683 } |
1682 } | 1684 } |
1683 } | 1685 } |
1684 | 1686 |
1685 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 1687 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
1686 const base::Callback<base::Time()>& get_timestamp_callback) { | 1688 const base::Callback<base::Time()>& get_timestamp_callback) { |
1687 get_timestamp_callback_ = get_timestamp_callback; | 1689 get_timestamp_callback_ = get_timestamp_callback; |
1688 } | 1690 } |
1689 | 1691 |
1690 } // namespace content | 1692 } // namespace content |
OLD | NEW |