Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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_WEB_WEB_STATE_UI_WEB_VIEW_NAVIGATION_PROXY_H_ | |
| 6 #define IOS_WEB_WEB_STATE_UI_WEB_VIEW_NAVIGATION_PROXY_H_ | |
| 7 | |
| 8 @class NSArray; | |
| 9 @class WKBackForwardListItem; | |
| 10 | |
| 11 namespace web { | |
| 12 | |
| 13 // 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.
| |
| 14 class WebViewNavigationProxy { | |
| 15 public: | |
| 16 virtual ~WebViewNavigationProxy() {} | |
| 17 | |
| 18 virtual bool CanGoBack() const = 0; | |
| 19 virtual bool CanGoForward() const = 0; | |
| 20 virtual void GoBack() const = 0; | |
| 21 virtual void GoForward() const = 0; | |
| 22 virtual void GoToBackForwardListItem(WKBackForwardListItem* item) const = 0; | |
| 23 | |
| 24 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
| |
| 25 virtual NSArray* GetBackList() const = 0; | |
| 26 virtual NSArray* GetForwardList() const = 0; | |
| 27 virtual WKBackForwardListItem* GetItemAtOffset(int offset) const = 0; | |
| 28 }; | |
| 29 | |
| 30 } // namespace web | |
| 31 | |
| 32 #endif // IOS_WEB_WEB_STATE_UI_WEB_VIEW_NAVIGATION_PROXY_H_ | |
| OLD | NEW |