| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #import "ios/web/web_state/web_state_impl.h" | 5 #import "ios/web/web_state/web_state_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 } | 447 } |
| 448 } | 448 } |
| 449 | 449 |
| 450 bool WebStateImpl::HandleContextMenu(const web::ContextMenuParams& params) { | 450 bool WebStateImpl::HandleContextMenu(const web::ContextMenuParams& params) { |
| 451 if (delegate_) { | 451 if (delegate_) { |
| 452 return delegate_->HandleContextMenu(this, params); | 452 return delegate_->HandleContextMenu(this, params); |
| 453 } | 453 } |
| 454 return false; | 454 return false; |
| 455 } | 455 } |
| 456 | 456 |
| 457 void WebStateImpl::ShowRepostFormWarningDialog( |
| 458 const base::Callback<void(bool)>& callback) { |
| 459 if (delegate_) { |
| 460 delegate_->ShowRepostFormWarningDialog(this, callback); |
| 461 } else { |
| 462 callback.Run(true); |
| 463 } |
| 464 } |
| 465 |
| 457 void WebStateImpl::RunJavaScriptDialog( | 466 void WebStateImpl::RunJavaScriptDialog( |
| 458 const GURL& origin_url, | 467 const GURL& origin_url, |
| 459 JavaScriptDialogType javascript_dialog_type, | 468 JavaScriptDialogType javascript_dialog_type, |
| 460 NSString* message_text, | 469 NSString* message_text, |
| 461 NSString* default_prompt_text, | 470 NSString* default_prompt_text, |
| 462 const DialogClosedCallback& callback) { | 471 const DialogClosedCallback& callback) { |
| 463 JavaScriptDialogPresenter* presenter = | 472 JavaScriptDialogPresenter* presenter = |
| 464 delegate_ ? delegate_->GetJavaScriptDialogPresenter(this) : nullptr; | 473 delegate_ ? delegate_->GetJavaScriptDialogPresenter(this) : nullptr; |
| 465 if (!presenter) { | 474 if (!presenter) { |
| 466 callback.Run(false, nil); | 475 callback.Run(false, nil); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 const LoadCommittedDetails& load_details) { | 734 const LoadCommittedDetails& load_details) { |
| 726 for (auto& observer : observers_) | 735 for (auto& observer : observers_) |
| 727 observer.NavigationItemCommitted(load_details); | 736 observer.NavigationItemCommitted(load_details); |
| 728 } | 737 } |
| 729 | 738 |
| 730 WebState* WebStateImpl::GetWebState() { | 739 WebState* WebStateImpl::GetWebState() { |
| 731 return this; | 740 return this; |
| 732 } | 741 } |
| 733 | 742 |
| 734 } // namespace web | 743 } // namespace web |
| OLD | NEW |