OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ios/chrome/browser/ui/dialogs/java_script_dialog_presenter_impl.h" | 5 #include "ios/chrome/browser/ui/dialogs/java_script_dialog_presenter_impl.h" |
6 | 6 |
7 #import "ios/chrome/browser/ui/dialogs/dialog_presenter.h" | 7 #import "ios/chrome/browser/ui/dialogs/dialog_presenter.h" |
8 #import "ios/chrome/browser/ui/dialogs/javascript_dialog_blocking_util.h" | 8 #import "ios/chrome/browser/ui/dialogs/javascript_dialog_blocking_util.h" |
9 | 9 |
| 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 11 #error "This file requires ARC support." |
| 12 #endif |
| 13 |
10 JavaScriptDialogPresenterImpl::JavaScriptDialogPresenterImpl( | 14 JavaScriptDialogPresenterImpl::JavaScriptDialogPresenterImpl( |
11 DialogPresenter* dialogPresenter) | 15 DialogPresenter* dialogPresenter) |
12 : dialog_presenter_([dialogPresenter retain]) {} | 16 : dialog_presenter_(dialogPresenter) {} |
13 | 17 |
14 JavaScriptDialogPresenterImpl::~JavaScriptDialogPresenterImpl() {} | 18 JavaScriptDialogPresenterImpl::~JavaScriptDialogPresenterImpl() {} |
15 | 19 |
16 void JavaScriptDialogPresenterImpl::RunJavaScriptDialog( | 20 void JavaScriptDialogPresenterImpl::RunJavaScriptDialog( |
17 web::WebState* web_state, | 21 web::WebState* web_state, |
18 const GURL& origin_url, | 22 const GURL& origin_url, |
19 web::JavaScriptDialogType dialog_type, | 23 web::JavaScriptDialogType dialog_type, |
20 NSString* message_text, | 24 NSString* message_text, |
21 NSString* default_prompt_text, | 25 NSString* default_prompt_text, |
22 const web::DialogClosedCallback& callback) { | 26 const web::DialogClosedCallback& callback) { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 break; | 70 break; |
67 } | 71 } |
68 default: | 72 default: |
69 break; | 73 break; |
70 } | 74 } |
71 } | 75 } |
72 | 76 |
73 void JavaScriptDialogPresenterImpl::CancelDialogs(web::WebState* web_state) { | 77 void JavaScriptDialogPresenterImpl::CancelDialogs(web::WebState* web_state) { |
74 [dialog_presenter_ cancelDialogForWebState:web_state]; | 78 [dialog_presenter_ cancelDialogForWebState:web_state]; |
75 } | 79 } |
OLD | NEW |