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 #ifndef CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // Commits the current pending entry and issues the NOTIFY_NAV_ENTRY_COMMIT | 198 // Commits the current pending entry and issues the NOTIFY_NAV_ENTRY_COMMIT |
199 // notification. No changes are made to the entry during this process, it is | 199 // notification. No changes are made to the entry during this process, it is |
200 // just moved from pending to committed. This is an alternative to | 200 // just moved from pending to committed. This is an alternative to |
201 // RendererDidNavigate for simple TabContents types. | 201 // RendererDidNavigate for simple TabContents types. |
202 // | 202 // |
203 // When the pending entry is a new navigation, it will have a page ID of -1. | 203 // When the pending entry is a new navigation, it will have a page ID of -1. |
204 // The caller should leave this as-is. CommitPendingEntry will generate a | 204 // The caller should leave this as-is. CommitPendingEntry will generate a |
205 // new page ID for you and update the TabContents with that ID. | 205 // new page ID for you and update the TabContents with that ID. |
206 void CommitPendingEntry(); | 206 void CommitPendingEntry(); |
207 | 207 |
208 // Discards the pending and transient entries if any. Calling this may cause | 208 // Discards the pending and transient entries if any. |
209 // the active tab contents to switch if the current entry corresponds to a | |
210 // different tab contents type. | |
211 void DiscardNonCommittedEntries(); | 209 void DiscardNonCommittedEntries(); |
212 | 210 |
213 // Returns the pending entry corresponding to the navigation that is | 211 // Returns the pending entry corresponding to the navigation that is |
214 // currently in progress, or null if there is none. | 212 // currently in progress, or null if there is none. |
215 NavigationEntry* pending_entry() const { | 213 NavigationEntry* pending_entry() const { |
216 return pending_entry_; | 214 return pending_entry_; |
217 } | 215 } |
218 | 216 |
219 // Returns the index of the pending entry or -1 if the pending entry | 217 // Returns the index of the pending entry or -1 if the pending entry |
220 // corresponds to a new navigation (created via LoadURL). | 218 // corresponds to a new navigation (created via LoadURL). |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 // when testing. | 495 // when testing. |
498 static bool check_for_repost_; | 496 static bool check_for_repost_; |
499 | 497 |
500 // The maximum number of entries that a navigation controller can store. | 498 // The maximum number of entries that a navigation controller can store. |
501 static size_t max_entry_count_; | 499 static size_t max_entry_count_; |
502 | 500 |
503 DISALLOW_COPY_AND_ASSIGN(NavigationController); | 501 DISALLOW_COPY_AND_ASSIGN(NavigationController); |
504 }; | 502 }; |
505 | 503 |
506 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 504 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
OLD | NEW |