Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/tab_contents/navigation_controller.h" | 5 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 858 DCHECK(pending_entry_index_ != -1); | 858 DCHECK(pending_entry_index_ != -1); |
| 859 pending_entry_ = entries_[pending_entry_index_].get(); | 859 pending_entry_ = entries_[pending_entry_index_].get(); |
| 860 } | 860 } |
| 861 | 861 |
| 862 if (!tab_contents_->NavigateToPendingEntry(reload)) | 862 if (!tab_contents_->NavigateToPendingEntry(reload)) |
| 863 DiscardNonCommittedEntries(); | 863 DiscardNonCommittedEntries(); |
| 864 } | 864 } |
| 865 | 865 |
| 866 void NavigationController::NotifyNavigationEntryCommitted( | 866 void NavigationController::NotifyNavigationEntryCommitted( |
| 867 LoadCommittedDetails* details) { | 867 LoadCommittedDetails* details) { |
| 868 details->entry = GetActiveEntry(); | |
| 869 NotificationDetails out_details = Details<LoadCommittedDetails>(details); | |
|
Peter Kasting
2009/04/30 22:07:54
Nit: Perhaps |notification_details| instead of |ou
| |
| 870 | |
| 871 // We need to notify the ssl_manager_ before the tab_contents_ so the | |
| 872 // location bar will have up-to-date information about the security style. | |
| 873 // This is to work around the fact that parts of the location bar draw | |
|
Peter Kasting
2009/04/30 22:07:54
I would just eliminate these last two lines and ap
| |
| 874 // synchronously. See http://crbug.com/11157 | |
| 875 ssl_manager_.DidCommitProvisionalLoad(out_details); | |
| 876 | |
| 868 // TODO(pkasting): http://b/1113079 Probably these explicit notification paths | 877 // TODO(pkasting): http://b/1113079 Probably these explicit notification paths |
| 869 // should be removed, and interested parties should just listen for the | 878 // should be removed, and interested parties should just listen for the |
| 870 // notification below instead. | 879 // notification below instead. |
| 871 tab_contents_->NotifyNavigationStateChanged( | 880 tab_contents_->NotifyNavigationStateChanged( |
| 872 TabContents::INVALIDATE_EVERYTHING); | 881 TabContents::INVALIDATE_EVERYTHING); |
| 873 | 882 |
| 874 details->entry = GetActiveEntry(); | |
| 875 NotificationService::current()->Notify( | 883 NotificationService::current()->Notify( |
| 876 NotificationType::NAV_ENTRY_COMMITTED, | 884 NotificationType::NAV_ENTRY_COMMITTED, |
| 877 Source<NavigationController>(this), | 885 Source<NavigationController>(this), |
| 878 Details<LoadCommittedDetails>(details)); | 886 out_details); |
| 879 } | 887 } |
| 880 | 888 |
| 881 // static | 889 // static |
| 882 void NavigationController::DisablePromptOnRepost() { | 890 void NavigationController::DisablePromptOnRepost() { |
| 883 check_for_repost_ = false; | 891 check_for_repost_ = false; |
| 884 } | 892 } |
| 885 | 893 |
| 886 void NavigationController::SetActive(bool is_active) { | 894 void NavigationController::SetActive(bool is_active) { |
| 887 if (is_active) { | 895 if (is_active) { |
| 888 if (needs_reload_) { | 896 if (needs_reload_) { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 949 return i; | 957 return i; |
| 950 } | 958 } |
| 951 return -1; | 959 return -1; |
| 952 } | 960 } |
| 953 | 961 |
| 954 NavigationEntry* NavigationController::GetTransientEntry() const { | 962 NavigationEntry* NavigationController::GetTransientEntry() const { |
| 955 if (transient_entry_index_ == -1) | 963 if (transient_entry_index_ == -1) |
| 956 return NULL; | 964 return NULL; |
| 957 return entries_[transient_entry_index_].get(); | 965 return entries_[transient_entry_index_].get(); |
| 958 } | 966 } |
| OLD | NEW |