OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 // reload, while only a different ref would be in-page (pages can't clear | 357 // reload, while only a different ref would be in-page (pages can't clear |
358 // refs without reload, only change to "#" which we don't count as empty). | 358 // refs without reload, only change to "#" which we don't count as empty). |
359 bool IsURLInPageNavigation(const GURL& url) const; | 359 bool IsURLInPageNavigation(const GURL& url) const; |
360 | 360 |
361 // Copies the navigation state from the given controller to this one. This | 361 // Copies the navigation state from the given controller to this one. This |
362 // one should be empty (just created). | 362 // one should be empty (just created). |
363 void CopyStateFrom(const NavigationController& source); | 363 void CopyStateFrom(const NavigationController& source); |
364 | 364 |
365 // A variant of CopyStateFrom. Removes all entries from this except the last | 365 // A variant of CopyStateFrom. Removes all entries from this except the last |
366 // entry, inserts all entries from |source| before and including the active | 366 // entry, inserts all entries from |source| before and including the active |
367 // entry and resets the |session_id_| of this to match |source|. This is | 367 // entry. This method is intended for use when the last entry of |this| is the |
368 // intended for use when you're going to throw away |source| and replace it | 368 // active entry. For example: |
369 // with this. This method is intended for use when the last entry of |this| | |
370 // is the active entry. For example: | |
371 // source: A B *C* D | 369 // source: A B *C* D |
372 // this: E F *G* (last must be active or pending) | 370 // this: E F *G* (last must be active or pending) |
373 // result: A B *G* | 371 // result: A B *G* |
374 // This ignores the transient index of the source and honors that of 'this'. | 372 // This ignores the transient index of the source and honors that of 'this'. |
375 void CopyStateFromAndPrune(NavigationController* source); | 373 void CopyStateFromAndPrune(NavigationController* source); |
376 | 374 |
377 // Removes all the entries except the active entry. If there is a new pending | 375 // Removes all the entries except the active entry. If there is a new pending |
378 // navigation it is preserved. | 376 // navigation it is preserved. |
379 void PruneAllButActive(); | 377 void PruneAllButActive(); |
380 | 378 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 static size_t max_entry_count_; | 594 static size_t max_entry_count_; |
597 | 595 |
598 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), | 596 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), |
599 // NO_RELOAD otherwise. | 597 // NO_RELOAD otherwise. |
600 ReloadType pending_reload_; | 598 ReloadType pending_reload_; |
601 | 599 |
602 DISALLOW_COPY_AND_ASSIGN(NavigationController); | 600 DISALLOW_COPY_AND_ASSIGN(NavigationController); |
603 }; | 601 }; |
604 | 602 |
605 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 603 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
OLD | NEW |