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 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 // No longer needed since content state will hold the post data if any. | 918 // No longer needed since content state will hold the post data if any. |
919 active_entry->SetBrowserInitiatedPostData(NULL); | 919 active_entry->SetBrowserInitiatedPostData(NULL); |
920 | 920 |
921 // Once committed, we do not need to track if the entry was initiated by | 921 // Once committed, we do not need to track if the entry was initiated by |
922 // the renderer. | 922 // the renderer. |
923 active_entry->set_is_renderer_initiated(false); | 923 active_entry->set_is_renderer_initiated(false); |
924 | 924 |
925 // The active entry's SiteInstance should match our SiteInstance. | 925 // The active entry's SiteInstance should match our SiteInstance. |
926 DCHECK(active_entry->site_instance() == web_contents_->GetSiteInstance()); | 926 DCHECK(active_entry->site_instance() == web_contents_->GetSiteInstance()); |
927 | 927 |
| 928 // Remember the bindings the renderer process has at this point, so that |
| 929 // we do not grant this entry additional bindings if we come back to it. |
| 930 active_entry->SetBindings( |
| 931 web_contents_->GetRenderViewHost()->GetEnabledBindings()); |
| 932 |
928 // Now prep the rest of the details for the notification and broadcast. | 933 // Now prep the rest of the details for the notification and broadcast. |
929 details->entry = active_entry; | 934 details->entry = active_entry; |
930 details->is_main_frame = | 935 details->is_main_frame = |
931 PageTransitionIsMainFrame(params.transition); | 936 PageTransitionIsMainFrame(params.transition); |
932 details->serialized_security_info = params.security_info; | 937 details->serialized_security_info = params.security_info; |
933 details->http_status_code = params.http_status_code; | 938 details->http_status_code = params.http_status_code; |
934 NotifyNavigationEntryCommitted(details); | 939 NotifyNavigationEntryCommitted(details); |
935 | 940 |
936 return true; | 941 return true; |
937 } | 942 } |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1781 const base::Callback<base::Time()>& get_timestamp_callback) { | 1786 const base::Callback<base::Time()>& get_timestamp_callback) { |
1782 get_timestamp_callback_ = get_timestamp_callback; | 1787 get_timestamp_callback_ = get_timestamp_callback; |
1783 } | 1788 } |
1784 | 1789 |
1785 void NavigationControllerImpl::SetTakeScreenshotCallbackForTest( | 1790 void NavigationControllerImpl::SetTakeScreenshotCallbackForTest( |
1786 const base::Callback<void(RenderViewHost*)>& take_screenshot_callback) { | 1791 const base::Callback<void(RenderViewHost*)>& take_screenshot_callback) { |
1787 take_screenshot_callback_ = take_screenshot_callback; | 1792 take_screenshot_callback_ = take_screenshot_callback; |
1788 } | 1793 } |
1789 | 1794 |
1790 } // namespace content | 1795 } // namespace content |
OLD | NEW |