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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.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 | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | 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_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index ae2806e715333df1cd7df7ec65186a8de7357c39..d4150f7674ef3df12c48060020c8510b1e518312 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -199,6 +199,7 @@ RenderWidgetHostViewAndroid::GetRenderWidgetHost() const {
}
void RenderWidgetHostViewAndroid::WasShown() {
+ DCHECK(host_);
if (!host_->is_hidden())
return;
@@ -208,6 +209,7 @@ void RenderWidgetHostViewAndroid::WasShown() {
void RenderWidgetHostViewAndroid::WasHidden() {
RunAckCallbacks();
+ DCHECK(host_);
if (host_->is_hidden())
return;
@@ -356,6 +358,8 @@ void RenderWidgetHostViewAndroid::Show() {
are_layers_attached_ = true;
AttachLayers();
+
+ WasShown();
}
void RenderWidgetHostViewAndroid::Hide() {
@@ -364,6 +368,8 @@ void RenderWidgetHostViewAndroid::Hide() {
are_layers_attached_ = false;
RemoveLayers();
+
+ WasHidden();
}
bool RenderWidgetHostViewAndroid::IsShowing() {
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698