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

Unified Diff: content/test/test_render_view_host.cc

Issue 1713473002: Make TestRenderWidgetHostView::Show/Hide call through to RWHI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@crash
Patch Set: Tentatively undo render_widget_host_view_base.cc modification 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 5f6ed0d036e00b627fd700d3a33e729baf9cf462..a64eb4e8271b5349a955c14af2d511b9f5cb66b9 100644
--- a/content/test/test_render_view_host.cc
+++ b/content/test/test_render_view_host.cc
@@ -60,7 +60,6 @@ void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params,
TestRenderWidgetHostView::TestRenderWidgetHostView(RenderWidgetHost* rwh)
: rwh_(RenderWidgetHostImpl::From(rwh)),
- is_showing_(false),
is_occluded_(false),
did_swap_compositor_frame_(false) {
#if defined(OS_ANDROID)
@@ -122,16 +121,18 @@ bool TestRenderWidgetHostView::IsSurfaceAvailableForCopy() const {
}
void TestRenderWidgetHostView::Show() {
- is_showing_ = true;
is_occluded_ = false;
+ if (rwh_->is_hidden())
+ rwh_->WasShown(ui::LatencyInfo());
}
void TestRenderWidgetHostView::Hide() {
- is_showing_ = false;
+ if (!rwh_->is_hidden())
+ rwh_->WasHidden();
}
bool TestRenderWidgetHostView::IsShowing() {
- return is_showing_;
+ return !rwh_->is_hidden();
}
void TestRenderWidgetHostView::WasUnOccluded() {
@@ -271,14 +272,6 @@ MockRenderProcessHost* TestRenderViewHost::GetProcess() const {
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