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

Unified Diff: ios/web/web_state/ui/web_view_navigation_proxy.h

Issue 2957163002: [Navigation Experiment] Add WKBasedNavigationManagerImpl. (Closed)
Patch Set: Patch for review 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/web_state/ui/web_view_navigation_proxy.h
diff --git a/ios/web/web_state/ui/web_view_navigation_proxy.h b/ios/web/web_state/ui/web_view_navigation_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..5f8ff525342b7ca9a8ff17184fee5f426dffce8d
--- /dev/null
+++ b/ios/web/web_state/ui/web_view_navigation_proxy.h
@@ -0,0 +1,32 @@
+// 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_WEB_STATE_UI_WEB_VIEW_NAVIGATION_PROXY_H_
+#define IOS_WEB_WEB_STATE_UI_WEB_VIEW_NAVIGATION_PROXY_H_
+
+@class NSArray;
+@class WKBackForwardListItem;
+
+namespace web {
+
+// Interface to expose navigation related functionality on WKWebView.
Eugene But (OOO till 7-30) 2017/06/29 16:25:04 If we end up with keeping the wrapper, could you p
danyao 2017/06/29 22:03:29 Acknowledged.
+class WebViewNavigationProxy {
+ public:
+ virtual ~WebViewNavigationProxy() {}
+
+ 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;
Eugene But (OOO till 7-30) 2017/06/29 01:48:19 Sorry I just realized that proxy still exposes WK
danyao 2017/06/29 16:05:26 Ah I didn't realize that I can use OCMockObject. S
Eugene But (OOO till 7-30) 2017/06/29 16:25:04 Yeah, second alternative adds more code to WebCont
+ virtual NSArray* GetBackList() const = 0;
+ virtual NSArray* GetForwardList() const = 0;
+ virtual WKBackForwardListItem* GetItemAtOffset(int offset) const = 0;
+};
+
+} // namespace web
+
+#endif // IOS_WEB_WEB_STATE_UI_WEB_VIEW_NAVIGATION_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698