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..1b426777de74e2e0e2f65c40d0fc0b1be3a59a35 |
--- /dev/null |
+++ b/ios/web/web_state/js/crw_js_post_request_loader.h |
@@ -0,0 +1,27 @@ |
+// 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/WKWebView.h> |
Eugene But (OOO till 7-30)
2015/12/02 17:06:15
s/<WebKit/WKWebView.h>/<WebKit/WebKit.h>
https://
stkhapugin
2015/12/03 15:43:01
Done.
|
+ |
+@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. If an error occurs, |errorBlock| is called. If the load |
+// was successfull, the optional |successBlock| is called. |
+- (void)loadPOSTRequest:(NSURLRequest*)request |
+ inWebView:(WKWebView*)webView |
+ messageRouter:(CRWWKScriptMessageRouter*)messageRouter |
+ errorBlock:(void (^)(NSError*))errorBlock |
Eugene But (OOO till 7-30)
2015/12/02 17:06:15
There should be only one completion handler for bo
stkhapugin
2015/12/03 15:43:01
Done.
|
+ successBlock:(void (^)())successBlock; |
+ |
+@end |
+ |
+#endif // IOS_WEB_WEB_STATE_JS_CRW_JS_POST_REQUEST_LOADER_H_ |