Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 bool from_last_session, | 71 bool from_last_session, |
| 72 std::vector<NavigationEntry*>* entries); | 72 std::vector<NavigationEntry*>* entries); |
| 73 | 73 |
| 74 // Active entry -------------------------------------------------------------- | 74 // Active entry -------------------------------------------------------------- |
| 75 | 75 |
| 76 // Returns the active entry, which is the transient entry if any, the pending | 76 // Returns the active entry, which is the transient entry if any, the pending |
| 77 // entry if a navigation is in progress or the last committed entry otherwise. | 77 // entry if a navigation is in progress or the last committed entry otherwise. |
| 78 // NOTE: This can be NULL!! | 78 // NOTE: This can be NULL!! |
| 79 // | 79 // |
| 80 // If you are trying to get the current state of the NavigationController, | 80 // If you are trying to get the current state of the NavigationController, |
| 81 // this is the method you will typically want to call. | 81 // this is the method you will typically want to call. |
|
brettw
2011/08/30 16:15:18
Can you update this comment to say when you should
Charlie Reis
2011/08/30 17:04:58
Sure-- fixed.
| |
| 82 NavigationEntry* GetActiveEntry() const; | 82 NavigationEntry* GetActiveEntry() const; |
| 83 | 83 |
| 84 // Returns the same entry as GetActiveEntry, except that it ignores pending | |
| 85 // history navigation entries. When the user clicks back or forward, the | |
| 86 // location bar and other indicators should not update until the pending entry | |
| 87 // commits. | |
| 88 NavigationEntry* GetVisibleEntry() const; | |
| 89 | |
| 84 // Returns the index from which we would go back/forward or reload. This is | 90 // Returns the index from which we would go back/forward or reload. This is |
| 85 // the last_committed_entry_index_ if pending_entry_index_ is -1. Otherwise, | 91 // the last_committed_entry_index_ if pending_entry_index_ is -1. Otherwise, |
| 86 // it is the pending_entry_index_. | 92 // it is the pending_entry_index_. |
| 87 int GetCurrentEntryIndex() const; | 93 int GetCurrentEntryIndex() const; |
| 88 | 94 |
| 89 // Returns the last committed entry, which may be null if there are no | 95 // Returns the last committed entry, which may be null if there are no |
| 90 // committed entries. | 96 // committed entries. |
| 91 NavigationEntry* GetLastCommittedEntry() const; | 97 NavigationEntry* GetLastCommittedEntry() const; |
| 92 | 98 |
| 93 // Returns true if the source for the current entry can be viewed. | 99 // Returns true if the source for the current entry can be viewed. |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 470 static size_t max_entry_count_; | 476 static size_t max_entry_count_; |
| 471 | 477 |
| 472 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), | 478 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), |
| 473 // NO_RELOAD otherwise. | 479 // NO_RELOAD otherwise. |
| 474 ReloadType pending_reload_; | 480 ReloadType pending_reload_; |
| 475 | 481 |
| 476 DISALLOW_COPY_AND_ASSIGN(NavigationController); | 482 DISALLOW_COPY_AND_ASSIGN(NavigationController); |
| 477 }; | 483 }; |
| 478 | 484 |
| 479 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 485 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
| OLD | NEW |