| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 NavigationController::NavigationController(TabContents* contents, | 118 NavigationController::NavigationController(TabContents* contents, |
| 119 Profile* profile) | 119 Profile* profile) |
| 120 : profile_(profile), | 120 : profile_(profile), |
| 121 pending_entry_(NULL), | 121 pending_entry_(NULL), |
| 122 last_committed_entry_index_(-1), | 122 last_committed_entry_index_(-1), |
| 123 pending_entry_index_(-1), | 123 pending_entry_index_(-1), |
| 124 transient_entry_index_(-1), | 124 transient_entry_index_(-1), |
| 125 tab_contents_(contents), | 125 tab_contents_(contents), |
| 126 max_restored_page_id_(-1), | 126 max_restored_page_id_(-1), |
| 127 ALLOW_THIS_IN_INITIALIZER_LIST(ssl_manager_(this)), | 127 ALLOW_THIS_IN_INITIALIZER_LIST(ssl_manager_(this)), |
| 128 needs_reload_(false) { | 128 needs_reload_(false), |
| 129 user_gesture_observed_(false) { |
| 129 DCHECK(profile_); | 130 DCHECK(profile_); |
| 130 } | 131 } |
| 131 | 132 |
| 132 NavigationController::~NavigationController() { | 133 NavigationController::~NavigationController() { |
| 133 DiscardNonCommittedEntriesInternal(); | 134 DiscardNonCommittedEntriesInternal(); |
| 134 | 135 |
| 135 NotificationService::current()->Notify( | 136 NotificationService::current()->Notify( |
| 136 NotificationType::TAB_CLOSED, | 137 NotificationType::TAB_CLOSED, |
| 137 Source<NavigationController>(this), | 138 Source<NavigationController>(this), |
| 138 NotificationService::NoDetails()); | 139 NotificationService::NoDetails()); |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 return i; | 975 return i; |
| 975 } | 976 } |
| 976 return -1; | 977 return -1; |
| 977 } | 978 } |
| 978 | 979 |
| 979 NavigationEntry* NavigationController::GetTransientEntry() const { | 980 NavigationEntry* NavigationController::GetTransientEntry() const { |
| 980 if (transient_entry_index_ == -1) | 981 if (transient_entry_index_ == -1) |
| 981 return NULL; | 982 return NULL; |
| 982 return entries_[transient_entry_index_].get(); | 983 return entries_[transient_entry_index_].get(); |
| 983 } | 984 } |
| OLD | NEW |