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

Side by Side Diff: ios/web/public/javascript_dialog_presenter.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: Cleanup. Created 4 years, 5 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698