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

Unified Diff: content/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 23866013: Make the RenderViewHostImpl update its visibility after a swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bring symmetry to the functionality of Hide / Show across all platform-specific impls. Created 7 years, 3 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/browser/renderer_host/render_widget_host_view_aura.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_gtk.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc
index 1fe5d4c3e54070707a1b091f05efc165ce15b2f1..5f11fce910bba13849a7532a1088ad1b6eeb96db 100644
--- a/content/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -689,6 +689,8 @@ void RenderWidgetHostViewGtk::WasShown() {
if (web_contents_switch_paint_time_.is_null())
web_contents_switch_paint_time_ = base::TimeTicks::Now();
is_hidden_ = false;
+
+ DCHECK(host_);
host_->WasShown();
}
@@ -703,6 +705,7 @@ void RenderWidgetHostViewGtk::WasHidden() {
// If we have a renderer, then inform it that we are being hidden so it can
// reduce its resource utilization.
+ DCHECK(host_);
host_->WasHidden();
web_contents_switch_paint_time_ = base::TimeTicks();
@@ -792,10 +795,12 @@ bool RenderWidgetHostViewGtk::IsSurfaceAvailableForCopy() const {
void RenderWidgetHostViewGtk::Show() {
gtk_widget_show(view_.get());
+ WasShown();
}
void RenderWidgetHostViewGtk::Hide() {
gtk_widget_hide(view_.get());
+ WasHidden();
}
bool RenderWidgetHostViewGtk::IsShowing() {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698