Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: ios/web/public/java_script_dialog_callback.h

Issue 2074733002: Add public API for handling Javascript alerts and prompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace BOOL with bool in unittest. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/ios_web.gyp ('k') | ios/web/public/java_script_dialog_presenter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ios/web/ios_web.gyp ('k') | ios/web/public/java_script_dialog_presenter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698