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

Issue 2957163002: [Navigation Experiment] Add WKBasedNavigationManagerImpl. (Closed)

Created:
3 years, 5 months ago by danyao
Modified:
3 years, 5 months ago
CC:
chromium-reviews, ios-reviews_chromium.org, ios-reviews+web_chromium.org, liaoyuke+watch_chromium.org, Eugene But (OOO till 7-30), huangml+watch_chromium.org, baxley+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Navigation Experiment] Add skeleton WKBasedNavigationManagerImpl. Introduced WebViewNavigationProxy protocol to expose navigation related WKWebView APIs to WKBasedNavigationManagerImpl. Moved WebLoadParams and AreURLsInPageNavigation from LegacyNavigationManagerImpl to the parent NavigationManagerImpl to allow sharing with WKBasedNavigationManagerImpl. Also replaced CRWSessionController API calls in navigation_manager_impl_unittest with the equivalent NavigationManager APIs so these unit tests can be shared to test WKBasedNavigationManagerImpl. A special case is CanGoBackWithTransientItem: NavigationManager::AddTransientItem() expects a non-null pending (or committed) item to exist (the session controller version doesn't check this), so updated the test setup to avoid the error. This matches real-world usage. BUG=734150 Review-Url: https://codereview.chromium.org/2957163002 Cr-Commit-Position: refs/heads/master@{#483756} Committed: https://chromium.googlesource.com/chromium/src/+/fc108a3f8b0a86e98f379d27a8cc525ab1e30b99

Patch Set 1 #

Total comments: 7

Patch Set 2 : Patch for review #

Total comments: 29

Patch Set 3 : Changed WebViewNavigationProxy to a protocol #

Total comments: 11

Patch Set 4 : Rename to CRWWebViewNavigationProxy #

Total comments: 2

Patch Set 5 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+653 lines, -143 lines) Patch
M ios/web/BUILD.gn View 1 2 3 3 chunks +4 lines, -0 lines 0 comments Download
M ios/web/navigation/legacy_navigation_manager_impl.mm View 1 2 2 chunks +2 lines, -46 lines 0 comments Download
M ios/web/navigation/navigation_manager_delegate.h View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M ios/web/navigation/navigation_manager_impl.h View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
A ios/web/navigation/navigation_manager_impl.mm View 1 2 1 chunk +56 lines, -0 lines 0 comments Download
M ios/web/navigation/navigation_manager_impl_unittest.mm View 1 2 3 51 chunks +128 lines, -92 lines 0 comments Download
M ios/web/navigation/session_storage_builder.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ios/web/navigation/session_storage_builder.mm View 1 2 1 chunk +1 line, -3 lines 0 comments Download
A ios/web/navigation/wk_based_navigation_manager_impl.h View 1 2 3 1 chunk +119 lines, -0 lines 0 comments Download
A ios/web/navigation/wk_based_navigation_manager_impl.mm View 1 2 3 1 chunk +268 lines, -0 lines 0 comments Download
M ios/web/test/fakes/test_navigation_manager_delegate.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M ios/web/test/fakes/test_navigation_manager_delegate.mm View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller.mm View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
A ios/web/web_state/ui/crw_web_view_navigation_proxy.h View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
M ios/web/web_state/web_state_impl.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M ios/web/web_state/web_state_impl.mm View 1 2 3 4 chunks +12 lines, -2 lines 0 comments Download

Messages

Total messages: 37 (22 generated)
Eugene But (OOO till 7-30)
WKBasedNavigationManagerImpl::SetWebViewNavigationProxy suggestion is optional https://codereview.chromium.org/2957163002/diff/1/ios/web/navigation/navigation_manager_delegate.h File ios/web/navigation/navigation_manager_delegate.h (right): https://codereview.chromium.org/2957163002/diff/1/ios/web/navigation/navigation_manager_delegate.h#newcode50 ios/web/navigation/navigation_manager_delegate.h:50: virtual WebViewNavigationProxy* GetWebViewNavigationProxy() const = ...
3 years, 5 months ago (2017-06-27 22:02:01 UTC) #2
danyao
HI Eugene, This CL is ready for review now. PTAL. Thanks, Danyao https://codereview.chromium.org/2957163002/diff/1/ios/web/navigation/navigation_manager_delegate.h File ios/web/navigation/navigation_manager_delegate.h ...
3 years, 5 months ago (2017-06-28 22:11:05 UTC) #9
Eugene But (OOO till 7-30)
Thank you for splitting the CL! https://codereview.chromium.org/2957163002/diff/1/ios/web/navigation/navigation_manager_delegate.h File ios/web/navigation/navigation_manager_delegate.h (right): https://codereview.chromium.org/2957163002/diff/1/ios/web/navigation/navigation_manager_delegate.h#newcode50 ios/web/navigation/navigation_manager_delegate.h:50: virtual WebViewNavigationProxy* GetWebViewNavigationProxy() ...
3 years, 5 months ago (2017-06-29 01:48:19 UTC) #10
danyao
Thanks for the review! I addressed all comments, but there's the open question about whether ...
3 years, 5 months ago (2017-06-29 16:05:26 UTC) #11
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2957163002/diff/60001/ios/web/web_state/ui/web_view_navigation_proxy.h File ios/web/web_state/ui/web_view_navigation_proxy.h (right): https://codereview.chromium.org/2957163002/diff/60001/ios/web/web_state/ui/web_view_navigation_proxy.h#newcode13 ios/web/web_state/ui/web_view_navigation_proxy.h:13: // Interface to expose navigation related functionality on WKWebView. ...
3 years, 5 months ago (2017-06-29 16:25:04 UTC) #12
danyao
On 2017/06/29 16:25:04, Eugene But wrote: > https://codereview.chromium.org/2957163002/diff/60001/ios/web/web_state/ui/web_view_navigation_proxy.h > File ios/web/web_state/ui/web_view_navigation_proxy.h (right): > > https://codereview.chromium.org/2957163002/diff/60001/ios/web/web_state/ui/web_view_navigation_proxy.h#newcode13 ...
3 years, 5 months ago (2017-06-29 19:31:24 UTC) #13
danyao
Thanks for the conformsToProtocol tip. It worked! I deleted the wrapper and switching to using ...
3 years, 5 months ago (2017-06-29 22:03:29 UTC) #20
Eugene But (OOO till 7-30)
Generally everything looks great, thank you very much for doing this! Have a few minor ...
3 years, 5 months ago (2017-06-29 22:28:02 UTC) #22
danyao
https://codereview.chromium.org/2957163002/diff/160001/ios/web/navigation/wk_based_navigation_manager_impl.mm File ios/web/navigation/wk_based_navigation_manager_impl.mm (right): https://codereview.chromium.org/2957163002/diff/160001/ios/web/navigation/wk_based_navigation_manager_impl.mm#newcode27 ios/web/navigation/wk_based_navigation_manager_impl.mm:27: WKBasedNavigationManagerImpl::WKBasedNavigationManagerImpl() On 2017/06/29 22:28:02, Eugene But wrote: > Could ...
3 years, 5 months ago (2017-06-29 23:09:48 UTC) #25
Eugene But (OOO till 7-30)
lgtm! https://codereview.chromium.org/2957163002/diff/160001/ios/web/navigation/wk_based_navigation_manager_impl.mm File ios/web/navigation/wk_based_navigation_manager_impl.mm (right): https://codereview.chromium.org/2957163002/diff/160001/ios/web/navigation/wk_based_navigation_manager_impl.mm#newcode27 ios/web/navigation/wk_based_navigation_manager_impl.mm:27: WKBasedNavigationManagerImpl::WKBasedNavigationManagerImpl() On 2017/06/29 23:09:47, danyao wrote: > On ...
3 years, 5 months ago (2017-06-30 00:59:54 UTC) #26
danyao
Thanks for the thorough review! https://codereview.chromium.org/2957163002/diff/220001/ios/web/web_state/ui/crw_web_controller.mm File ios/web/web_state/ui/crw_web_controller.mm (right): https://codereview.chromium.org/2957163002/diff/220001/ios/web/web_state/ui/crw_web_controller.mm#newcode1430 ios/web/web_state/ui/crw_web_controller.mm:1430: if ([self.webView conformsToProtocol:@protocol(CRWWebViewNavigationProxy)]) { ...
3 years, 5 months ago (2017-06-30 14:51:43 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2957163002/240001
3 years, 5 months ago (2017-06-30 14:52:19 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/461554)
3 years, 5 months ago (2017-06-30 16:25:14 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2957163002/240001
3 years, 5 months ago (2017-06-30 18:07:22 UTC) #34
commit-bot: I haz the power
3 years, 5 months ago (2017-06-30 18:11:49 UTC) #37
Message was sent while issue was closed.
Committed patchset #5 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/fc108a3f8b0a86e98f379d27a8cc...

Powered by Google App Engine
This is Rietveld 408576698