Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
index ed555cc02ee3902056d4e34ae76f00031fe416cf..59c640cc27ef0b7d7323781dc76d66daf9bd2e1e 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -690,20 +690,25 @@ RenderWidgetHost* RenderWidgetHostViewAura::GetRenderWidgetHost() const { |
} |
void RenderWidgetHostViewAura::WasShown() { |
- if (!host_->is_hidden()) |
+ if (!host_ || !host_->is_hidden()) |
piman
2013/09/20 16:51:30
Where is host_ reset? I can't find the code that d
|
return; |
host_->WasShown(); |
if (framebuffer_holder_) |
FrameMemoryManager::GetInstance()->SetFrameVisibility(this, true); |
- aura::client::CursorClient* cursor_client = |
- aura::client::GetCursorClient(window_->GetRootWindow()); |
- if (cursor_client) |
- NotifyRendererOfCursorVisibilityState(cursor_client->IsCursorVisible()); |
+ aura::RootWindow* root = window_->GetRootWindow(); |
+ if (root) { |
+ aura::client::CursorClient* cursor_client = |
+ aura::client::GetCursorClient(root); |
+ if (cursor_client) |
+ NotifyRendererOfCursorVisibilityState(cursor_client->IsCursorVisible()); |
+ } |
if (!current_surface_.get() && host_->is_accelerated_compositing_active() && |
!released_front_lock_.get()) { |
- released_front_lock_ = GetCompositor()->GetCompositorLock(); |
+ ui::Compositor* compositor = GetCompositor(); |
+ if (compositor) |
+ released_front_lock_ = compositor->GetCompositorLock(); |
} |
#if defined(OS_WIN) |
@@ -714,7 +719,7 @@ void RenderWidgetHostViewAura::WasShown() { |
} |
void RenderWidgetHostViewAura::WasHidden() { |
- if (host_->is_hidden()) |
+ if (!host_ || host_->is_hidden()) |
return; |
host_->WasHidden(); |
if (framebuffer_holder_) |
@@ -961,10 +966,12 @@ bool RenderWidgetHostViewAura::IsSurfaceAvailableForCopy() const { |
void RenderWidgetHostViewAura::Show() { |
window_->Show(); |
+ WasShown(); |
} |
void RenderWidgetHostViewAura::Hide() { |
window_->Hide(); |
+ WasHidden(); |
} |
bool RenderWidgetHostViewAura::IsShowing() { |