| 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 JavaScriptDialogPresenter* presenter = | 497 JavaScriptDialogPresenter* presenter = |
| 498 delegate_ ? delegate_->GetJavaScriptDialogPresenter(this) : nullptr; | 498 delegate_ ? delegate_->GetJavaScriptDialogPresenter(this) : nullptr; |
| 499 if (!presenter) { | 499 if (!presenter) { |
| 500 callback.Run(false, nil); | 500 callback.Run(false, nil); |
| 501 return; | 501 return; |
| 502 } | 502 } |
| 503 presenter->RunJavaScriptDialog(this, origin_url, javascript_dialog_type, | 503 presenter->RunJavaScriptDialog(this, origin_url, javascript_dialog_type, |
| 504 message_text, default_prompt_text, callback); | 504 message_text, default_prompt_text, callback); |
| 505 } | 505 } |
| 506 | 506 |
| 507 WebState* WebStateImpl::CreateNewWebState(const GURL& url, |
| 508 const GURL& opener_url, |
| 509 bool initiated_by_user) { |
| 510 if (delegate_) { |
| 511 return delegate_->CreateNewWebState(this, url, opener_url, |
| 512 initiated_by_user); |
| 513 } |
| 514 return nullptr; |
| 515 } |
| 516 |
| 507 void WebStateImpl::OnAuthRequired( | 517 void WebStateImpl::OnAuthRequired( |
| 508 NSURLProtectionSpace* protection_space, | 518 NSURLProtectionSpace* protection_space, |
| 509 NSURLCredential* proposed_credential, | 519 NSURLCredential* proposed_credential, |
| 510 const WebStateDelegate::AuthCallback& callback) { | 520 const WebStateDelegate::AuthCallback& callback) { |
| 511 if (delegate_) { | 521 if (delegate_) { |
| 512 delegate_->OnAuthRequired(this, protection_space, proposed_credential, | 522 delegate_->OnAuthRequired(this, protection_space, proposed_credential, |
| 513 callback); | 523 callback); |
| 514 } else { | 524 } else { |
| 515 callback.Run(nil, nil); | 525 callback.Run(nil, nil); |
| 516 } | 526 } |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 const LoadCommittedDetails& load_details) { | 740 const LoadCommittedDetails& load_details) { |
| 731 for (auto& observer : observers_) | 741 for (auto& observer : observers_) |
| 732 observer.NavigationItemCommitted(load_details); | 742 observer.NavigationItemCommitted(load_details); |
| 733 } | 743 } |
| 734 | 744 |
| 735 WebState* WebStateImpl::GetWebState() { | 745 WebState* WebStateImpl::GetWebState() { |
| 736 return this; | 746 return this; |
| 737 } | 747 } |
| 738 | 748 |
| 739 } // namespace web | 749 } // namespace web |
| OLD | NEW |