Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Unified Diff: content/test/test_render_view_host.cc

Issue 2684993011: Revert of Make TestRenderWidgetHostView::Show/Hide call through to RWHI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@crash
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/test_render_view_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_render_view_host.cc
diff --git a/content/test/test_render_view_host.cc b/content/test/test_render_view_host.cc
index a64eb4e8271b5349a955c14af2d511b9f5cb66b9..5f6ed0d036e00b627fd700d3a33e729baf9cf462 100644
--- a/content/test/test_render_view_host.cc
+++ b/content/test/test_render_view_host.cc
@@ -60,6 +60,7 @@
TestRenderWidgetHostView::TestRenderWidgetHostView(RenderWidgetHost* rwh)
: rwh_(RenderWidgetHostImpl::From(rwh)),
+ is_showing_(false),
is_occluded_(false),
did_swap_compositor_frame_(false) {
#if defined(OS_ANDROID)
@@ -121,18 +122,16 @@
}
void TestRenderWidgetHostView::Show() {
+ is_showing_ = true;
is_occluded_ = false;
- if (rwh_->is_hidden())
- rwh_->WasShown(ui::LatencyInfo());
}
void TestRenderWidgetHostView::Hide() {
- if (!rwh_->is_hidden())
- rwh_->WasHidden();
+ is_showing_ = false;
}
bool TestRenderWidgetHostView::IsShowing() {
- return !rwh_->is_hidden();
+ return is_showing_;
}
void TestRenderWidgetHostView::WasUnOccluded() {
@@ -272,6 +271,14 @@
return static_cast<MockRenderProcessHost*>(RenderViewHostImpl::GetProcess());
}
+void TestRenderViewHost::SimulateWasHidden() {
+ GetWidget()->WasHidden();
+}
+
+void TestRenderViewHost::SimulateWasShown() {
+ GetWidget()->WasShown(ui::LatencyInfo());
+}
+
WebPreferences TestRenderViewHost::TestComputeWebkitPrefs() {
return ComputeWebkitPrefs();
}
« no previous file with comments | « content/test/test_render_view_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698