Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Unified Diff: ios/public/provider/web/navigation_manager.h

Issue 777183002: Upstream iOS web API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/public/provider/web/navigation_manager.h
diff --git a/ios/public/provider/web/navigation_manager.h b/ios/public/provider/web/navigation_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..a707703ebd1df70e339e04ef30e61052aa8210a7
--- /dev/null
+++ b/ios/public/provider/web/navigation_manager.h
@@ -0,0 +1,41 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_PUBLIC_PROVIDER_WEB_NAVIGATION_MANAGER_H_
+#define IOS_PUBLIC_PROVIDER_WEB_NAVIGATION_MANAGER_H_
+
+namespace web {
+class BrowserState;
+class NavigationItem;
+}
+
+namespace ios {
+
+class WebState;
+
+// A NavigationManager maintains the back-forward list for a WebState and
+// manages all navigation within that list.
+//
+// Each NavigationManager belongs to one WebState; each WebState has
+// exactly one NavigationManager.
+class NavigationManager {
+ public:
+ virtual ~NavigationManager() {}
+
+ // Gets the web::BrowserState associated with this NavigationManager. Can
+ // never return NULL.
+ virtual web::BrowserState* GetBrowserState() const = 0;
+
+ // Gets the WebState associated with this NavigationManager.
+ virtual WebState* GetWebState() const = 0;
+
+ // Returns the NavigationItem that should be used when displaying info about
+ // the current entry to the user. It ignores certain pending entries, to
+ // prevent spoofing attacks using slow-loading navigations.
+ virtual web::NavigationItem* GetVisibleItem() const = 0;
+};
+
+} // namespace ios
+
+#endif // IOS_PUBLIC_PROVIDER_WEB_NAVIGATION_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698