| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 | 187 |
| 188 void WebStateImpl::OnNavigationCommitted(const GURL& url) { | 188 void WebStateImpl::OnNavigationCommitted(const GURL& url) { |
| 189 UpdateHttpResponseHeaders(url); | 189 UpdateHttpResponseHeaders(url); |
| 190 std::unique_ptr<NavigationContext> context = | 190 std::unique_ptr<NavigationContext> context = |
| 191 NavigationContextImpl::CreateNavigationContext(this, url); | 191 NavigationContextImpl::CreateNavigationContext(this, url); |
| 192 for (auto& observer : observers_) | 192 for (auto& observer : observers_) |
| 193 observer.DidFinishNavigation(context.get()); | 193 observer.DidFinishNavigation(context.get()); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void WebStateImpl::OnUrlHashChanged() { | |
| 197 for (auto& observer : observers_) | |
| 198 observer.UrlHashChanged(); | |
| 199 } | |
| 200 | |
| 201 void WebStateImpl::OnHistoryStateChanged() { | |
| 202 for (auto& observer : observers_) | |
| 203 observer.HistoryStateChanged(); | |
| 204 } | |
| 205 | |
| 206 void WebStateImpl::OnSamePageNavigation(const GURL& url) { | 196 void WebStateImpl::OnSamePageNavigation(const GURL& url) { |
| 207 std::unique_ptr<NavigationContext> context = | 197 std::unique_ptr<NavigationContext> context = |
| 208 NavigationContextImpl::CreateSamePageNavigationContext(this, url); | 198 NavigationContextImpl::CreateSamePageNavigationContext(this, url); |
| 209 for (auto& observer : observers_) | 199 for (auto& observer : observers_) |
| 210 observer.DidFinishNavigation(context.get()); | 200 observer.DidFinishNavigation(context.get()); |
| 211 } | 201 } |
| 212 | 202 |
| 213 void WebStateImpl::OnErrorPageNavigation(const GURL& url) { | 203 void WebStateImpl::OnErrorPageNavigation(const GURL& url) { |
| 214 std::unique_ptr<NavigationContext> context = | 204 std::unique_ptr<NavigationContext> context = |
| 215 NavigationContextImpl::CreateErrorPageNavigationContext(this, url); | 205 NavigationContextImpl::CreateErrorPageNavigationContext(this, url); |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 const LoadCommittedDetails& load_details) { | 731 const LoadCommittedDetails& load_details) { |
| 742 for (auto& observer : observers_) | 732 for (auto& observer : observers_) |
| 743 observer.NavigationItemCommitted(load_details); | 733 observer.NavigationItemCommitted(load_details); |
| 744 } | 734 } |
| 745 | 735 |
| 746 WebState* WebStateImpl::GetWebState() { | 736 WebState* WebStateImpl::GetWebState() { |
| 747 return this; | 737 return this; |
| 748 } | 738 } |
| 749 | 739 |
| 750 } // namespace web | 740 } // namespace web |
| OLD | NEW |