Chromium Code Reviews| 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..f2153987c57c14a45d83de9d93deb5ee77b8e6ec |
| --- /dev/null |
| +++ b/ios/web/web_state/js/crw_js_post_request_loader.h |
| @@ -0,0 +1,26 @@ |
| +// 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 |completionBlock| is called once the request has been |
| +// executed. In case of successful request, the passed error is nil. |
|
Eugene But (OOO till 7-30)
2015/12/03 16:51:42
Add: |completionBlock| can not be null.
stkhapugin
2015/12/03 17:51:02
Done.
|
| +- (void)loadPOSTRequest:(NSURLRequest*)request |
| + inWebView:(WKWebView*)webView |
| + messageRouter:(CRWWKScriptMessageRouter*)messageRouter |
| + completionBlock:(void (^)(NSError*))completionBlock; |
|
Eugene But (OOO till 7-30)
2015/12/03 16:51:42
Optional NIT s/completionBlock/completionHandler s
stkhapugin
2015/12/03 17:51:02
Done.
|
| + |
| +@end |
| + |
| +#endif // IOS_WEB_WEB_STATE_JS_CRW_JS_POST_REQUEST_LOADER_H_ |