OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/navigation_controller_impl.h" | 5 #include "content/browser/web_contents/navigation_controller_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 // No longer needed since content state will hold the post data if any. | 929 // No longer needed since content state will hold the post data if any. |
930 active_entry->SetBrowserInitiatedPostData(NULL); | 930 active_entry->SetBrowserInitiatedPostData(NULL); |
931 | 931 |
932 // Once committed, we do not need to track if the entry was initiated by | 932 // Once committed, we do not need to track if the entry was initiated by |
933 // the renderer. | 933 // the renderer. |
934 active_entry->set_is_renderer_initiated(false); | 934 active_entry->set_is_renderer_initiated(false); |
935 | 935 |
936 // The active entry's SiteInstance should match our SiteInstance. | 936 // The active entry's SiteInstance should match our SiteInstance. |
937 DCHECK(active_entry->site_instance() == web_contents_->GetSiteInstance()); | 937 DCHECK(active_entry->site_instance() == web_contents_->GetSiteInstance()); |
938 | 938 |
| 939 // Remember the bindings the renderer process has at this point, so that |
| 940 // we do not grant this entry additional bindings if we come back to it. |
| 941 active_entry->SetBindings( |
| 942 web_contents_->GetRenderViewHost()->GetEnabledBindings()); |
| 943 |
939 // Now prep the rest of the details for the notification and broadcast. | 944 // Now prep the rest of the details for the notification and broadcast. |
940 details->entry = active_entry; | 945 details->entry = active_entry; |
941 details->is_main_frame = | 946 details->is_main_frame = |
942 PageTransitionIsMainFrame(params.transition); | 947 PageTransitionIsMainFrame(params.transition); |
943 details->serialized_security_info = params.security_info; | 948 details->serialized_security_info = params.security_info; |
944 details->http_status_code = params.http_status_code; | 949 details->http_status_code = params.http_status_code; |
945 NotifyNavigationEntryCommitted(details); | 950 NotifyNavigationEntryCommitted(details); |
946 | 951 |
947 return true; | 952 return true; |
948 } | 953 } |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1779 const base::Callback<base::Time()>& get_timestamp_callback) { | 1784 const base::Callback<base::Time()>& get_timestamp_callback) { |
1780 get_timestamp_callback_ = get_timestamp_callback; | 1785 get_timestamp_callback_ = get_timestamp_callback; |
1781 } | 1786 } |
1782 | 1787 |
1783 void NavigationControllerImpl::SetTakeScreenshotCallbackForTest( | 1788 void NavigationControllerImpl::SetTakeScreenshotCallbackForTest( |
1784 const base::Callback<void(RenderViewHost*)>& take_screenshot_callback) { | 1789 const base::Callback<void(RenderViewHost*)>& take_screenshot_callback) { |
1785 take_screenshot_callback_ = take_screenshot_callback; | 1790 take_screenshot_callback_ = take_screenshot_callback; |
1786 } | 1791 } |
1787 | 1792 |
1788 } // namespace content | 1793 } // namespace content |
OLD | NEW |