From 2585bf167bc0c62d214b9803998ea2b6c5df139d Mon Sep 17 00:00:00 2001 From: "ppi@chromium.org" Date: Tue, 17 Dec 2013 23:01:47 +0000 Subject: Android: allow to set the initial visibility of WebContents being created. This patch exposes the |initially_hidden| creation parameter of WebContents in Java ContentViewUtil, allowing the Android embedder to correctly set the visibility of WebContents created for tabs opened to load in background. Also, the |are_layers_attached| flag of RenderWidgetHostViewAndroid is now set in constructor to match visibility tracked in RenderWidgetHost. This allows to fix the Page Visibility API for tabs opened to load in background. BUG=327125 Review URL: https://codereview.chromium.org/110873006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241399 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/renderer_host/render_widget_host_view_android.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content') 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 171bacf..3df0b11 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc @@ -109,7 +109,7 @@ RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid( ContentViewCoreImpl* content_view_core) : host_(widget_host), needs_begin_frame_(false), - are_layers_attached_(true), + are_layers_attached_(!widget_host->is_hidden()), content_view_core_(NULL), ime_adapter_android_(this), cached_background_color_(SK_ColorWHITE), -- cgit v1.1