Index: ios/web/public/java_script_dialog_callback.h |
diff --git a/ios/web/public/java_script_dialog_callback.h b/ios/web/public/java_script_dialog_callback.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1d89ccd6bcf4bdb0f4c150f0cf41d8b8d16349bc |
--- /dev/null |
+++ b/ios/web/public/java_script_dialog_callback.h |
@@ -0,0 +1,20 @@ |
+// Copyright 2016 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_PUBLIC_JAVA_SCRIPT_DIALOG_CALLBACK_H_ |
+#define IOS_WEB_PUBLIC_JAVA_SCRIPT_DIALOG_CALLBACK_H_ |
+ |
+#include "base/callback.h" |
+ |
+namespace web { |
+ |
+// Callback for |RunJavaScriptDialog|. The |success| value is true if the user |
+// responded with OK, |false| if the dialog was cancelled. The |user_input| |
+// value will exist for prompt alerts only. |
+typedef base::Callback<void(bool success, NSString* user_input)> |
+ DialogClosedCallback; |
+ |
+} // namespace web |
+ |
+#endif // IOS_WEB_PUBLIC_JAVA_SCRIPT_DIALOG_CALLBACK_H_ |