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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1903 if (!needs_reload_) | 1903 if (!needs_reload_) |
1904 return; | 1904 return; |
1905 | 1905 |
1906 // Calling Reload() results in ignoring state, and not loading. | 1906 // Calling Reload() results in ignoring state, and not loading. |
1907 // Explicitly use NavigateToPendingEntry so that the renderer uses the | 1907 // Explicitly use NavigateToPendingEntry so that the renderer uses the |
1908 // cached state. | 1908 // cached state. |
1909 pending_entry_index_ = last_committed_entry_index_; | 1909 pending_entry_index_ = last_committed_entry_index_; |
1910 NavigateToPendingEntry(NO_RELOAD); | 1910 NavigateToPendingEntry(NO_RELOAD); |
1911 } | 1911 } |
1912 | 1912 |
1913 void NavigationControllerImpl::NotifyEntryChanged(const NavigationEntry* entry, | 1913 void NavigationControllerImpl::NotifyEntryChanged( |
1914 int index) { | 1914 const NavigationEntry* entry) { |
1915 EntryChangedDetails det; | 1915 EntryChangedDetails det; |
1916 det.changed_entry = entry; | 1916 det.changed_entry = entry; |
1917 det.index = index; | 1917 det.index = GetIndexOfEntry( |
| 1918 NavigationEntryImpl::FromNavigationEntry(entry)); |
1918 NotificationService::current()->Notify( | 1919 NotificationService::current()->Notify( |
1919 NOTIFICATION_NAV_ENTRY_CHANGED, | 1920 NOTIFICATION_NAV_ENTRY_CHANGED, |
1920 Source<NavigationController>(this), | 1921 Source<NavigationController>(this), |
1921 Details<EntryChangedDetails>(&det)); | 1922 Details<EntryChangedDetails>(&det)); |
1922 } | 1923 } |
1923 | 1924 |
1924 void NavigationControllerImpl::FinishRestore(int selected_index, | 1925 void NavigationControllerImpl::FinishRestore(int selected_index, |
1925 RestoreType type) { | 1926 RestoreType type) { |
1926 DCHECK(selected_index >= 0 && selected_index < GetEntryCount()); | 1927 DCHECK(selected_index >= 0 && selected_index < GetEntryCount()); |
1927 ConfigureEntriesForRestore(&entries_, type); | 1928 ConfigureEntriesForRestore(&entries_, type); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2021 } | 2022 } |
2022 } | 2023 } |
2023 } | 2024 } |
2024 | 2025 |
2025 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2026 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2026 const base::Callback<base::Time()>& get_timestamp_callback) { | 2027 const base::Callback<base::Time()>& get_timestamp_callback) { |
2027 get_timestamp_callback_ = get_timestamp_callback; | 2028 get_timestamp_callback_ = get_timestamp_callback; |
2028 } | 2029 } |
2029 | 2030 |
2030 } // namespace content | 2031 } // namespace content |
OLD | NEW |