diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 23:53:25 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 23:53:25 +0000 |
commit | 88b795b46f0236976a6699f7af7dc1da1605b291 (patch) | |
tree | 6775521c0e71e4570a090b3c7b7e68d4f22b42ef /chrome/browser/renderer_host/render_widget_host.h | |
parent | e5d8b05f5f57390eab6bea89a35c5dc011df113a (diff) | |
download | chromium_src-88b795b46f0236976a6699f7af7dc1da1605b291.zip chromium_src-88b795b46f0236976a6699f7af7dc1da1605b291.tar.gz chromium_src-88b795b46f0236976a6699f7af7dc1da1605b291.tar.bz2 |
Don't send resize messages until the renderer has been initialized.
[Retry of 14260 with fixed unit test.]
1) Moves renderer_initialized_ from RenderWidgetView into RenderWidgetHost (its parent). Should be identical semantics to before.
2) Test renderer_initialized_ in RWH::WasResized().
This also reverts r13725, which was another attempt at fixing this problem.
BUG=9830,10659
TEST=From the Linux start page, click a link then click back -- should not get a gray page. From Google reader, click a link (which spawns a new tab within the same process) -- should not get a gray page.
Review URL: http://codereview.chromium.org/93038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14273 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_widget_host.h')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h index b6fd4d0..ad81ad8 100644 --- a/chrome/browser/renderer_host/render_widget_host.h +++ b/chrome/browser/renderer_host/render_widget_host.h @@ -142,7 +142,7 @@ class RenderWidgetHost : public IPC::Channel::Listener { // Called when a renderer object already been created for this host, and we // just need to be attached to it. Used for window.open, <select> dropdown // menus, and other times when the renderer initiates creating an object. - virtual void Init(); + void Init(); // Tells the renderer to die and then calls Destroy(). virtual void Shutdown(); @@ -282,6 +282,12 @@ class RenderWidgetHost : public IPC::Channel::Listener { virtual void NotifyRendererUnresponsive() {} virtual void NotifyRendererResponsive() {} + protected: + // true if a renderer has once been valid. We use this flag to display a sad + // tab only when we lose our renderer and not if a paint occurs during + // initialization. + bool renderer_initialized_; + private: FRIEND_TEST(RenderWidgetHostTest, Resize); FRIEND_TEST(RenderWidgetHostTest, HiddenPaint); |