| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/public/test/fakes/test_web_state.h" | 5 #import "ios/web/public/test/fakes/test_web_state.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "ios/web/public/web_state/web_state_observer.h" | 10 #include "ios/web/public/web_state/web_state_observer.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 observer.DidStopLoading(); | 155 observer.DidStopLoading(); |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 | 158 |
| 159 void TestWebState::OnPageLoaded( | 159 void TestWebState::OnPageLoaded( |
| 160 PageLoadCompletionStatus load_completion_status) { | 160 PageLoadCompletionStatus load_completion_status) { |
| 161 for (auto& observer : observers_) | 161 for (auto& observer : observers_) |
| 162 observer.PageLoaded(load_completion_status); | 162 observer.PageLoaded(load_completion_status); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void TestWebState::OnProvisionalNavigationStarted(const GURL& url) { |
| 166 for (auto& observer : observers_) |
| 167 observer.ProvisionalNavigationStarted(url); |
| 168 } |
| 169 |
| 165 void TestWebState::SetCurrentURL(const GURL& url) { | 170 void TestWebState::SetCurrentURL(const GURL& url) { |
| 166 url_ = url; | 171 url_ = url; |
| 167 } | 172 } |
| 168 | 173 |
| 169 void TestWebState::SetTrustLevel(URLVerificationTrustLevel trust_level) { | 174 void TestWebState::SetTrustLevel(URLVerificationTrustLevel trust_level) { |
| 170 trust_level_ = trust_level; | 175 trust_level_ = trust_level; |
| 171 } | 176 } |
| 172 | 177 |
| 173 CRWWebViewProxyType TestWebState::GetWebViewProxy() const { | 178 CRWWebViewProxyType TestWebState::GetWebViewProxy() const { |
| 174 return nullptr; | 179 return nullptr; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 185 service_manager::InterfaceRegistry* TestWebState::GetMojoInterfaceRegistry() { | 190 service_manager::InterfaceRegistry* TestWebState::GetMojoInterfaceRegistry() { |
| 186 return nullptr; | 191 return nullptr; |
| 187 } | 192 } |
| 188 | 193 |
| 189 base::WeakPtr<WebState> TestWebState::AsWeakPtr() { | 194 base::WeakPtr<WebState> TestWebState::AsWeakPtr() { |
| 190 NOTREACHED(); | 195 NOTREACHED(); |
| 191 return base::WeakPtr<WebState>(); | 196 return base::WeakPtr<WebState>(); |
| 192 } | 197 } |
| 193 | 198 |
| 194 } // namespace web | 199 } // namespace web |
| OLD | NEW |