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

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

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/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index 61ee232486bd3e1dae3e6285d49e8aae9157208e..8a046e57c51613ebcb611f49cd0ce9c8d6b1f35f 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -91,6 +91,7 @@
#import "ios/web/web_state/ui/crw_web_view_proxy_impl.h"
#import "ios/web/web_state/ui/crw_wk_navigation_states.h"
#import "ios/web/web_state/ui/crw_wk_script_message_router.h"
+#import "ios/web/web_state/ui/web_view_navigation_proxy_impl.h"
#import "ios/web/web_state/ui/wk_back_forward_list_item_holder.h"
#import "ios/web/web_state/ui/wk_web_view_configuration_provider.h"
#import "ios/web/web_state/web_controller_observer_bridge.h"
@@ -267,6 +268,7 @@ NSError* WKWebViewErrorWithSource(NSError* error, WKWebViewErrorSource source) {
base::WeakNSProtocol<id<CRWSwipeRecognizerProvider>> _swipeRecognizerProvider;
// The WKWebView managed by this instance.
base::scoped_nsobject<WKWebView> _webView;
+ std::unique_ptr<web::WebViewNavigationProxyImpl> _webViewNavigationProxyImpl;
// The CRWWebViewProxy is the wrapper to give components access to the
// web view in a controlled and limited way.
base::scoped_nsobject<CRWWebViewProxyImpl> _webViewProxy;
@@ -961,6 +963,8 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
selector:@selector(orientationDidChange)
name:UIApplicationDidChangeStatusBarOrientationNotification
object:nil];
+ _webViewNavigationProxyImpl =
+ base::MakeUnique<web::WebViewNavigationProxyImpl>(nullptr);
}
return self;
}
@@ -1425,6 +1429,11 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
return _webViewProxy.get();
}
+- (web::WebViewNavigationProxy*)webViewNavigationProxy {
+ _webViewNavigationProxyImpl->SetWebView(_webView);
+ return _webViewNavigationProxyImpl.get();
+}
+
- (UIView*)viewForPrinting {
// Printing is not supported for native controllers.
return _webView;

Powered by Google App Engine
This is Rietveld 408576698