| 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 return [web_controller_ view]; | 605 return [web_controller_ view]; |
| 606 } | 606 } |
| 607 | 607 |
| 608 BrowserState* WebStateImpl::GetBrowserState() const { | 608 BrowserState* WebStateImpl::GetBrowserState() const { |
| 609 return navigation_manager_.GetBrowserState(); | 609 return navigation_manager_.GetBrowserState(); |
| 610 } | 610 } |
| 611 | 611 |
| 612 void WebStateImpl::OpenURL(const WebState::OpenURLParams& params) { | 612 void WebStateImpl::OpenURL(const WebState::OpenURLParams& params) { |
| 613 DCHECK(Configured()); | 613 DCHECK(Configured()); |
| 614 ClearTransientContentView(); | 614 ClearTransientContentView(); |
| 615 [[web_controller_ delegate] openURLWithParams:params]; | 615 if (delegate_) |
| 616 delegate_->OpenURLFromWebState(this, params); |
| 616 } | 617 } |
| 617 | 618 |
| 618 void WebStateImpl::Stop() { | 619 void WebStateImpl::Stop() { |
| 619 [web_controller_ stopLoading]; | 620 [web_controller_ stopLoading]; |
| 620 } | 621 } |
| 621 | 622 |
| 622 const NavigationManager* WebStateImpl::GetNavigationManager() const { | 623 const NavigationManager* WebStateImpl::GetNavigationManager() const { |
| 623 return &GetNavigationManagerImpl(); | 624 return &GetNavigationManagerImpl(); |
| 624 } | 625 } |
| 625 | 626 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 const LoadCommittedDetails& load_details) { | 734 const LoadCommittedDetails& load_details) { |
| 734 for (auto& observer : observers_) | 735 for (auto& observer : observers_) |
| 735 observer.NavigationItemCommitted(load_details); | 736 observer.NavigationItemCommitted(load_details); |
| 736 } | 737 } |
| 737 | 738 |
| 738 WebState* WebStateImpl::GetWebState() { | 739 WebState* WebStateImpl::GetWebState() { |
| 739 return this; | 740 return this; |
| 740 } | 741 } |
| 741 | 742 |
| 742 } // namespace web | 743 } // namespace web |
| OLD | NEW |