OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PUBLIC_JAVA_SCRIPT_DIALOG_CALLBACK_H_ | 5 #ifndef IOS_WEB_PUBLIC_JAVA_SCRIPT_DIALOG_CALLBACK_H_ |
6 #define IOS_WEB_PUBLIC_JAVA_SCRIPT_DIALOG_CALLBACK_H_ | 6 #define IOS_WEB_PUBLIC_JAVA_SCRIPT_DIALOG_CALLBACK_H_ |
7 | 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 | 11 |
10 namespace web { | 12 namespace web { |
11 | 13 |
12 // Callback for |RunJavaScriptDialog|. The |success| value is true if the user | 14 // Callback for |RunJavaScriptDialog|. The |success| value is true if the user |
13 // responded with OK, |false| if the dialog was cancelled. The |user_input| | 15 // responded with OK, |false| if the dialog was cancelled. The |user_input| |
14 // value will exist for prompt alerts only. | 16 // value will exist for prompt alerts only. |
15 typedef base::Callback<void(bool success, NSString* user_input)> | 17 typedef base::Callback<void(bool success, NSString* user_input)> |
16 DialogClosedCallback; | 18 DialogClosedCallback; |
17 | 19 |
18 } // namespace web | 20 } // namespace web |
19 | 21 |
20 #endif // IOS_WEB_PUBLIC_JAVA_SCRIPT_DIALOG_CALLBACK_H_ | 22 #endif // IOS_WEB_PUBLIC_JAVA_SCRIPT_DIALOG_CALLBACK_H_ |
OLD | NEW |