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

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

Issue 1375023002: Adds support for POST request with bodies on WKWebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Noyau's comments Created 5 years 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/ios_web_unittests.gyp ('k') | ios/web/web_state/js/crw_js_post_request_loader.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.h
diff --git a/ios/web/web_state/js/crw_js_post_request_loader.h b/ios/web/web_state/js/crw_js_post_request_loader.h
new file mode 100644
index 0000000000000000000000000000000000000000..ffcde3bc7c060298d4ef44ddd9c19ba4ff977a44
--- /dev/null
+++ b/ios/web/web_state/js/crw_js_post_request_loader.h
@@ -0,0 +1,28 @@
+// Copyright 2015 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_JS_CRW_JS_POST_REQUEST_LOADER_H_
+#define IOS_WEB_WEB_STATE_JS_CRW_JS_POST_REQUEST_LOADER_H_
+
+#import <WebKit/WebKit.h>
+
+@class CRWWKScriptMessageRouter;
+
+// Class to load POST requests in a provided web view via JavaScript.
+@interface CRWJSPOSTRequestLoader : NSObject
+
+// Asynchronously loads a POST |request| in provided |webView|.
+// It temporarily installs JavaScript message routers with |messageRouter| to
+// handle HTTP errors. The |completionHandler| is called once the request has
+// been executed. In case of successful request, the passed error is nil.
+// The |completionHandler| must not be null. The |messageRouter| and |webView|
+// must not be nil. The |request| must be a POST request.
+- (void)loadPOSTRequest:(NSURLRequest*)request
+ inWebView:(WKWebView*)webView
+ messageRouter:(CRWWKScriptMessageRouter*)messageRouter
+ completionHandler:(void (^)(NSError*))completionHandler;
+
+@end
+
+#endif // IOS_WEB_WEB_STATE_JS_CRW_JS_POST_REQUEST_LOADER_H_
« no previous file with comments | « ios/web/ios_web_unittests.gyp ('k') | ios/web/web_state/js/crw_js_post_request_loader.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698