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

Unified Diff: ios/web/web_state/js/crw_js_post_request_loader.mm

Issue 2840473003: Return WKNavigation from loadRequest and loadPostRequest. (Closed)
Patch Set: Rebased Created 3 years, 7 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
« no previous file with comments | « ios/web/web_state/js/crw_js_post_request_loader.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/js/crw_js_post_request_loader.mm
diff --git a/ios/web/web_state/js/crw_js_post_request_loader.mm b/ios/web/web_state/js/crw_js_post_request_loader.mm
index 972d59750a819e374c11729089f4be1189e3a92e..1ea0ac31206fbdbb5866016529b15367e425220d 100644
--- a/ios/web/web_state/js/crw_js_post_request_loader.mm
+++ b/ios/web/web_state/js/crw_js_post_request_loader.mm
@@ -75,10 +75,10 @@ NSString* const kSuccessHandlerName = @"POSTSuccessHandler";
return _requestScript;
}
-- (void)loadPOSTRequest:(NSURLRequest*)request
- inWebView:(WKWebView*)webView
- messageRouter:(CRWWKScriptMessageRouter*)messageRouter
- completionHandler:(void (^)(NSError*))completionHandler {
+- (WKNavigation*)loadPOSTRequest:(NSURLRequest*)request
+ inWebView:(WKWebView*)webView
+ messageRouter:(CRWWKScriptMessageRouter*)messageRouter
+ completionHandler:(void (^)(NSError*))completionHandler {
DCHECK([request.HTTPMethod isEqualToString:@"POST"]);
DCHECK(webView);
DCHECK(messageRouter);
@@ -115,7 +115,7 @@ NSString* const kSuccessHandlerName = @"POSTSuccessHandler";
[NSString stringWithFormat:@"<html><script>%@%@</script></html>",
self.requestScript,
[self scriptToExecutePOSTRequest:request]];
- [webView loadHTMLString:HTML baseURL:request.URL];
+ return [webView loadHTMLString:HTML baseURL:request.URL];
}
#pragma mark - Private methods.
« no previous file with comments | « ios/web/web_state/js/crw_js_post_request_loader.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698