1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_
6 #define IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_
14 // A NavigationManager maintains the back-forward list for a WebState and
15 // manages all navigation within that list.
17 // Each NavigationManager belongs to one WebState; each WebState has
18 // exactly one NavigationManager.
19 class NavigationManager
{
21 virtual ~NavigationManager() {}
23 // Gets the BrowserState associated with this NavigationManager. Can never
25 virtual BrowserState
* GetBrowserState() const = 0;
27 // Gets the WebState associated with this NavigationManager.
28 virtual WebState
* GetWebState() const = 0;
30 // Returns the NavigationItem that should be used when displaying info about
31 // the current entry to the user. It ignores certain pending entries, to
32 // prevent spoofing attacks using slow-loading navigations.
33 virtual NavigationItem
* GetVisibleItem() const = 0;
35 // Returns the last committed NavigationItem, which may be null if there
36 // are no committed entries.
37 virtual NavigationItem
* GetLastCommittedItem() const = 0;
39 // Returns the pending entry corresponding to the navigation that is
40 // currently in progress, or null if there is none.
41 virtual NavigationItem
* GetPendingItem() const = 0;
46 #endif // IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_