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_JAVASCRIPT_DIALOG_PRESENTER_H_ | |
6 #define IOS_WEB_PUBLIC_JAVASCRIPT_DIALOG_PRESENTER_H_ | |
7 | |
8 #include "ios/web/public/javascript_dialog_callback.h" | |
9 #include "ios/web/public/javascript_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, | |
24 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.
| |
25 NSString* message_text, | |
26 NSString* default_prompt_text, | |
27 const DialogClosedCallback& callback) = 0; | |
28 // 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.
| |
29 // dialogs associated with |web_state|. | |
30 virtual void CancelActiveAndPendingDialogs(WebState* web_state) = 0; | |
31 }; | |
32 | |
33 } // namespace web | |
34 | |
35 #endif // IOS_WEB_PUBLIC_JAVASCRIPT_DIALOG_PRESENTER_H_ | |
OLD | NEW |