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_CHROME_BROWSER_UI_DIALOGS_JAVA_SCRIPT_DIALOG_PRESENTER_IMPL_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_DIALOGS_JAVA_SCRIPT_DIALOG_PRESENTER_IMPL_H_ |
| 7 |
| 8 #import "base/ios/weak_nsobject.h" |
| 9 #import "base/mac/scoped_nsobject.h" |
| 10 #include "ios/web/public/java_script_dialog_presenter.h" |
| 11 |
| 12 @class AlertCoordinator; |
| 13 @class DialogPresenter; |
| 14 |
| 15 class JavaScriptDialogPresenterImpl : public web::JavaScriptDialogPresenter { |
| 16 public: |
| 17 explicit JavaScriptDialogPresenterImpl(DialogPresenter* dialogPresenter); |
| 18 ~JavaScriptDialogPresenterImpl(); |
| 19 |
| 20 void RunJavaScriptDialog(web::WebState* web_state, |
| 21 const GURL& origin_url, |
| 22 web::JavaScriptDialogType dialog_type, |
| 23 NSString* message_text, |
| 24 NSString* default_prompt_text, |
| 25 const web::DialogClosedCallback& callback) override; |
| 26 |
| 27 void CancelDialogs(web::WebState* web_state) override; |
| 28 |
| 29 private: |
| 30 // The underlying DialogPresenter handling the dialog UI. |
| 31 base::scoped_nsobject<DialogPresenter> dialog_presenter_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogPresenterImpl); |
| 34 }; |
| 35 |
| 36 #endif // IOS_CHROME_BROWSER_UI_DIALOGS_JAVA_SCRIPT_DIALOG_PRESENTER_IMPL_H_ |
OLD | NEW |