Chromium Code Reviews| Index: ios/web/public/test/fakes/test_web_state.mm |
| diff --git a/ios/web/public/test/fakes/test_web_state.mm b/ios/web/public/test/fakes/test_web_state.mm |
| index 293473e10266e5fd92d5ab5042c32ff1f3f98912..0c460ccad35c2ca08211f87cac22049c300695b0 100644 |
| --- a/ios/web/public/test/fakes/test_web_state.mm |
| +++ b/ios/web/public/test/fakes/test_web_state.mm |
| @@ -23,6 +23,7 @@ TestWebState::TestWebState() |
| : browser_state_(nullptr), |
| web_usage_enabled_(false), |
| is_loading_(false), |
| + is_showing_transient_content_view_(false), |
| trust_level_(kAbsolute), |
| content_is_html_(true) {} |
| @@ -176,6 +177,17 @@ void TestWebState::OnProvisionalNavigationStarted(const GURL& url) { |
| observer.ProvisionalNavigationStarted(url); |
| } |
| +void TestWebState::OnRenderProcessGone() { |
| + for (auto& observer : observers_) |
| + observer.RenderProcessGone(); |
| +} |
| + |
| +void TestWebState::ShowTransientContentView(CRWContentView* content_view) { |
| + if (content_view) { |
| + is_showing_transient_content_view_ = true; |
|
Eugene But (OOO till 7-30)
2017/04/12 17:40:08
Do you want to set this to false in ClearTransient
peterlaurens
2017/04/12 18:00:53
Yes! Great idea, thanks!
|
| + } |
| +} |
| + |
| void TestWebState::SetCurrentURL(const GURL& url) { |
| url_ = url; |
| } |
| @@ -201,4 +213,8 @@ base::WeakPtr<WebState> TestWebState::AsWeakPtr() { |
| return base::WeakPtr<WebState>(); |
| } |
| +bool TestWebState::IsShowingTransientContentView() { |
| + return is_showing_transient_content_view_; |
| +} |
| + |
| } // namespace web |