OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef IOS_PUBLIC_PROVIDER_WEB_NAVIGATION_MANAGER_H_ |
| 6 #define IOS_PUBLIC_PROVIDER_WEB_NAVIGATION_MANAGER_H_ |
| 7 |
| 8 namespace web { |
| 9 class BrowserState; |
| 10 class NavigationItem; |
| 11 } |
| 12 |
| 13 namespace ios { |
| 14 |
| 15 class WebState; |
| 16 |
| 17 // A NavigationManager maintains the back-forward list for a WebState and |
| 18 // manages all navigation within that list. |
| 19 // |
| 20 // Each NavigationManager belongs to one WebState; each WebState has |
| 21 // exactly one NavigationManager. |
| 22 class NavigationManager { |
| 23 public: |
| 24 virtual ~NavigationManager() {} |
| 25 |
| 26 // Gets the web::BrowserState associated with this NavigationManager. Can |
| 27 // never return NULL. |
| 28 virtual web::BrowserState* GetBrowserState() const = 0; |
| 29 |
| 30 // Gets the WebState associated with this NavigationManager. |
| 31 virtual WebState* GetWebState() const = 0; |
| 32 |
| 33 // Returns the NavigationItem that should be used when displaying info about |
| 34 // the current entry to the user. It ignores certain pending entries, to |
| 35 // prevent spoofing attacks using slow-loading navigations. |
| 36 virtual web::NavigationItem* GetVisibleItem() const = 0; |
| 37 }; |
| 38 |
| 39 } // namespace ios |
| 40 |
| 41 #endif // IOS_PUBLIC_PROVIDER_WEB_NAVIGATION_MANAGER_H_ |
OLD | NEW |