Chromium Code Reviews| 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_ |