Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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_VIEW_INTERNAL_WEB_VIEW_JAVA_SCRIPT_DIALOG_PRESENTER_H_ | |
| 6 #define IOS_WEB_VIEW_INTERNAL_WEB_VIEW_JAVA_SCRIPT_DIALOG_PRESENTER_H_ | |
| 7 | |
| 8 #import "base/ios/weak_nsobject.h" | |
| 9 #include "ios/web/public/java_script_dialog_presenter.h" | |
| 10 | |
| 11 @class CWVWebView; | |
| 12 @protocol CWVUIDelegate; | |
| 13 | |
| 14 class WebViewJavaScriptDialogPresenter : public web::JavaScriptDialogPresenter { | |
|
Eugene But (OOO till 7-30)
2017/02/27 18:30:52
Please add comments to all non-trirvial interfaces
michaeldo
2017/02/27 21:35:51
Done.
| |
| 15 public: | |
| 16 WebViewJavaScriptDialogPresenter(CWVWebView* web_view, | |
| 17 id<CWVUIDelegate> ui_delegate); | |
| 18 ~WebViewJavaScriptDialogPresenter(); | |
| 19 | |
|
Eugene But (OOO till 7-30)
2017/02/27 18:30:52
// web::JavaScriptDialogPresenter overrides:
michaeldo
2017/02/27 21:35:51
Done.
| |
| 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 void SetUIDelegate(id<CWVUIDelegate> ui_delegate); | |
| 30 | |
| 31 private: | |
| 32 // The underlying delegate handling the dialog UI. | |
| 33 base::WeakNSProtocol<id<CWVUIDelegate>> ui_delegate_; | |
| 34 // The web view which originated the dialogs. | |
| 35 base::WeakNSObject<CWVWebView> web_view_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(WebViewJavaScriptDialogPresenter); | |
| 38 }; | |
| 39 | |
| 40 #endif // IOS_WEB_VIEW_INTERNAL_WEB_VIEW_JAVA_SCRIPT_DIALOG_PRESENTER_H_ | |
| OLD | NEW |