OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_WEB_PUBLIC_JAVA_SCRIPT_DIALOG_PRESENTER_H_ |
| 6 #define IOS_WEB_PUBLIC_JAVA_SCRIPT_DIALOG_PRESENTER_H_ |
| 7 |
| 8 #import "ios/web/public/java_script_dialog_callback.h" |
| 9 #include "ios/web/public/java_script_dialog_type.h" |
| 10 #include "url/gurl.h" |
| 11 |
| 12 @class NSString; |
| 13 |
| 14 namespace web { |
| 15 |
| 16 class WebState; |
| 17 |
| 18 class JavaScriptDialogPresenter { |
| 19 public: |
| 20 // Requests presentation of a JavaScript dialog. Clients must always call |
| 21 // |callback| even if they choose not to present the dialog. |
| 22 virtual void RunJavaScriptDialog(WebState* web_state, |
| 23 const GURL& origin_url, |
| 24 JavaScriptDialogType java_script_dialog_type, |
| 25 NSString* message_text, |
| 26 NSString* default_prompt_text, |
| 27 const DialogClosedCallback& callback) = 0; |
| 28 // Informs clients that all requested dialogs associated with |web_state| |
| 29 // should be dismissed. |
| 30 virtual void CancelActiveAndPendingDialogs(WebState* web_state) = 0; |
| 31 }; |
| 32 |
| 33 } // namespace web |
| 34 |
| 35 #endif // IOS_WEB_PUBLIC_JAVA_SCRIPT_DIALOG_PRESENTER_H_ |
OLD | NEW |