Index: ios/web/public/javascript_dialog_presenter.h |
diff --git a/ios/web/public/javascript_dialog_presenter.h b/ios/web/public/javascript_dialog_presenter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7b34ba6727f52895bc153abc5d8efda6324161bb |
--- /dev/null |
+++ b/ios/web/public/javascript_dialog_presenter.h |
@@ -0,0 +1,35 @@ |
+// 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_JAVASCRIPT_DIALOG_PRESENTER_H_ |
+#define IOS_WEB_PUBLIC_JAVASCRIPT_DIALOG_PRESENTER_H_ |
+ |
+#include "ios/web/public/javascript_dialog_callback.h" |
+#include "ios/web/public/javascript_dialog_type.h" |
+#include "url/gurl.h" |
+ |
+@class NSString; |
+ |
+namespace web { |
+ |
+class WebState; |
+ |
+class JavaScriptDialogPresenter { |
+ public: |
+ // Requests presentation of a JavaScript dialog. Clients must always call |
+ // |callback| even if they choose not to present the dialog. |
+ virtual void RunJavaScriptDialog(WebState* web_state, |
+ const GURL& origin, |
+ JavaScriptDialogType javascript_dialog_type, |
Eugene But (OOO till 7-30)
2016/06/27 21:09:37
NIT: s/java_script_dialog_type/javascript_dialog_t
michaeldo
2016/06/27 22:25:10
Done.
|
+ NSString* message_text, |
+ NSString* default_prompt_text, |
+ const DialogClosedCallback& callback) = 0; |
+ // Cancels the display of any currently displayed dialog and any queued |
Eugene But (OOO till 7-30)
2016/06/27 21:09:37
Please do not assume that clients queue these dial
michaeldo
2016/06/27 22:25:10
Done.
|
+ // dialogs associated with |web_state|. |
+ virtual void CancelActiveAndPendingDialogs(WebState* web_state) = 0; |
+}; |
+ |
+} // namespace web |
+ |
+#endif // IOS_WEB_PUBLIC_JAVASCRIPT_DIALOG_PRESENTER_H_ |