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

Unified Diff: ios/web/navigation/web_view_navigation_proxy.h

Issue 2957163002: [Navigation Experiment] Add WKBasedNavigationManagerImpl. (Closed)
Patch Set: Created 3 years, 6 months 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/web/navigation/web_view_navigation_proxy.h
diff --git a/ios/web/navigation/web_view_navigation_proxy.h b/ios/web/navigation/web_view_navigation_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..2449e294d2bacd435908638a2be9d30c2a774bb3
--- /dev/null
+++ b/ios/web/navigation/web_view_navigation_proxy.h
@@ -0,0 +1,34 @@
+// Copyright 2017 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_WEB_NAVIGATION_WEB_VIEW_NAVIGATION_PROXY_H_
+#define IOS_WEB_NAVIGATION_WEB_VIEW_NAVIGATION_PROXY_H_
+
+@class NSArray;
+@class WKBackForwardListItem;
+
+namespace web {
+
+// Interface to expose navigation related functionality on WKWebView.
+class WebViewNavigationProxy {
+ public:
+ virtual ~WebViewNavigationProxy() {}
+
+ virtual bool HasWebView() const = 0;
+
+ virtual bool CanGoBack() const = 0;
+ virtual bool CanGoForward() const = 0;
+ virtual void GoBack() const = 0;
+ virtual void GoForward() const = 0;
+ virtual void GoToBackForwardListItem(WKBackForwardListItem* item) const = 0;
+
+ virtual WKBackForwardListItem* GetCurrentItem() const = 0;
+ virtual NSArray<WKBackForwardListItem*>* GetBackList() const = 0;
+ virtual NSArray<WKBackForwardListItem*>* GetForwardList() const = 0;
+ virtual WKBackForwardListItem* GetItemAtOffset(int offset) const = 0;
+};
+
+} // namespace web
+
+#endif // IOS_WEB_NAVIGATION_WEB_VIEW_NAVIGATION_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698