| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 PageLoadCompletionStatus load_completion_status) { | 169 PageLoadCompletionStatus load_completion_status) { |
| 170 for (auto& observer : observers_) | 170 for (auto& observer : observers_) |
| 171 observer.PageLoaded(load_completion_status); | 171 observer.PageLoaded(load_completion_status); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void TestWebState::OnProvisionalNavigationStarted(const GURL& url) { | 174 void TestWebState::OnProvisionalNavigationStarted(const GURL& url) { |
| 175 for (auto& observer : observers_) | 175 for (auto& observer : observers_) |
| 176 observer.ProvisionalNavigationStarted(url); | 176 observer.ProvisionalNavigationStarted(url); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void TestWebState::OnRenderProcessGone() { |
| 180 for (auto& observer : observers_) |
| 181 observer.RenderProcessGone(); |
| 182 } |
| 183 |
| 184 void TestWebState::ShowTransientContentView(CRWContentView* content_view) {} |
| 185 |
| 179 void TestWebState::SetCurrentURL(const GURL& url) { | 186 void TestWebState::SetCurrentURL(const GURL& url) { |
| 180 url_ = url; | 187 url_ = url; |
| 181 } | 188 } |
| 182 | 189 |
| 183 void TestWebState::SetTrustLevel(URLVerificationTrustLevel trust_level) { | 190 void TestWebState::SetTrustLevel(URLVerificationTrustLevel trust_level) { |
| 184 trust_level_ = trust_level; | 191 trust_level_ = trust_level; |
| 185 } | 192 } |
| 186 | 193 |
| 187 CRWWebViewProxyType TestWebState::GetWebViewProxy() const { | 194 CRWWebViewProxyType TestWebState::GetWebViewProxy() const { |
| 188 return nullptr; | 195 return nullptr; |
| 189 } | 196 } |
| 190 | 197 |
| 191 service_manager::InterfaceRegistry* TestWebState::GetMojoInterfaceRegistry() { | 198 service_manager::InterfaceRegistry* TestWebState::GetMojoInterfaceRegistry() { |
| 192 return nullptr; | 199 return nullptr; |
| 193 } | 200 } |
| 194 | 201 |
| 195 bool TestWebState::HasOpener() const { | 202 bool TestWebState::HasOpener() const { |
| 196 return false; | 203 return false; |
| 197 } | 204 } |
| 198 | 205 |
| 199 base::WeakPtr<WebState> TestWebState::AsWeakPtr() { | 206 base::WeakPtr<WebState> TestWebState::AsWeakPtr() { |
| 200 NOTREACHED(); | 207 NOTREACHED(); |
| 201 return base::WeakPtr<WebState>(); | 208 return base::WeakPtr<WebState>(); |
| 202 } | 209 } |
| 203 | 210 |
| 204 } // namespace web | 211 } // namespace web |
| OLD | NEW |