| 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 } | 663 } |
| 664 | 664 |
| 665 id<CRWWebViewProxy> WebStateImpl::GetWebViewProxy() const { | 665 id<CRWWebViewProxy> WebStateImpl::GetWebViewProxy() const { |
| 666 return [web_controller_ webViewProxy]; | 666 return [web_controller_ webViewProxy]; |
| 667 } | 667 } |
| 668 | 668 |
| 669 bool WebStateImpl::HasOpener() const { | 669 bool WebStateImpl::HasOpener() const { |
| 670 return created_with_opener_; | 670 return created_with_opener_; |
| 671 } | 671 } |
| 672 | 672 |
| 673 void WebStateImpl::OnProvisionalNavigationStarted(const GURL& url) { | 673 void WebStateImpl::OnNavigationStarted(web::NavigationContext* context) { |
| 674 // TODO(crbug.com/713836): pass context to WebStateObserver callback. |
| 674 for (auto& observer : observers_) | 675 for (auto& observer : observers_) |
| 675 observer.ProvisionalNavigationStarted(url); | 676 observer.ProvisionalNavigationStarted(context->GetUrl()); |
| 676 } | 677 } |
| 677 | 678 |
| 678 void WebStateImpl::OnNavigationFinished(web::NavigationContext* context) { | 679 void WebStateImpl::OnNavigationFinished(web::NavigationContext* context) { |
| 679 for (auto& observer : observers_) | 680 for (auto& observer : observers_) |
| 680 observer.DidFinishNavigation(context); | 681 observer.DidFinishNavigation(context); |
| 681 } | 682 } |
| 682 | 683 |
| 683 #pragma mark - NavigationManagerDelegate implementation | 684 #pragma mark - NavigationManagerDelegate implementation |
| 684 | 685 |
| 685 void WebStateImpl::GoToIndex(int index) { | 686 void WebStateImpl::GoToIndex(int index) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 709 const LoadCommittedDetails& load_details) { | 710 const LoadCommittedDetails& load_details) { |
| 710 for (auto& observer : observers_) | 711 for (auto& observer : observers_) |
| 711 observer.NavigationItemCommitted(load_details); | 712 observer.NavigationItemCommitted(load_details); |
| 712 } | 713 } |
| 713 | 714 |
| 714 WebState* WebStateImpl::GetWebState() { | 715 WebState* WebStateImpl::GetWebState() { |
| 715 return this; | 716 return this; |
| 716 } | 717 } |
| 717 | 718 |
| 718 } // namespace web | 719 } // namespace web |
| OLD | NEW |