OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IOS_WEB_WEB_STATE_UI_WEB_VIEW_JS_UTILS_H_ | 5 #ifndef IOS_WEB_WEB_STATE_UI_WEB_VIEW_JS_UTILS_H_ |
6 #define IOS_WEB_WEB_STATE_UI_WEB_VIEW_JS_UTILS_H_ | 6 #define IOS_WEB_WEB_STATE_UI_WEB_VIEW_JS_UTILS_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "ios/web/public/block_types.h" | 11 #import "ios/web/public/block_types.h" |
12 | 12 |
13 @class WKWebView; | 13 @class WKWebView; |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class Value; | 16 class Value; |
17 } // namespace base | 17 } // namespace base |
18 | 18 |
19 namespace web { | 19 namespace web { |
20 | 20 |
21 // The domain for JS evaluation NSErrors in web. | 21 // The domain for JS evaluation NSErrors in web. |
(...skipping 13 matching lines...) Expand all Loading... |
35 | 35 |
36 // Executes JavaScript on WKWebView. If the web view cannot execute JS at the | 36 // Executes JavaScript on WKWebView. If the web view cannot execute JS at the |
37 // moment, |completion_handler| is called with an NSError. | 37 // moment, |completion_handler| is called with an NSError. |
38 void ExecuteJavaScript(WKWebView* web_view, | 38 void ExecuteJavaScript(WKWebView* web_view, |
39 NSString* script, | 39 NSString* script, |
40 JavaScriptResultBlock completion_handler); | 40 JavaScriptResultBlock completion_handler); |
41 | 41 |
42 } // namespace web | 42 } // namespace web |
43 | 43 |
44 #endif // IOS_WEB_WEB_STATE_UI_WEB_VIEW_JS_UTILS_H_ | 44 #endif // IOS_WEB_WEB_STATE_UI_WEB_VIEW_JS_UTILS_H_ |
OLD | NEW |