| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 waiting_for_screen_rects_ack_ = false; | 1229 waiting_for_screen_rects_ack_ = false; |
| 1230 | 1230 |
| 1231 // Must reset these to ensure that keyboard events work with a new renderer. | 1231 // Must reset these to ensure that keyboard events work with a new renderer. |
| 1232 suppress_next_char_events_ = false; | 1232 suppress_next_char_events_ = false; |
| 1233 | 1233 |
| 1234 // Reset some fields in preparation for recovering from a crash. | 1234 // Reset some fields in preparation for recovering from a crash. |
| 1235 ResetSizeAndRepaintPendingFlags(); | 1235 ResetSizeAndRepaintPendingFlags(); |
| 1236 current_size_.SetSize(0, 0); | 1236 current_size_.SetSize(0, 0); |
| 1237 // After the renderer crashes, the view is destroyed and so the | 1237 // After the renderer crashes, the view is destroyed and so the |
| 1238 // RenderWidgetHost cannot track its visibility anymore. We assume such | 1238 // RenderWidgetHost cannot track its visibility anymore. We assume such |
| 1239 // RenderWidgetHost to be visible for the sake of internal accounting - be | 1239 // RenderWidgetHost to be invisible for the sake of internal accounting - be |
| 1240 // careful about changing this - see http://crbug.com/401859. | 1240 // careful about changing this - see http://crbug.com/401859 and |
| 1241 // http://crbug.com/522795. |
| 1241 // | 1242 // |
| 1242 // We need to at least make sure that the RenderProcessHost is notified about | 1243 // We need to at least make sure that the RenderProcessHost is notified about |
| 1243 // the |is_hidden_| change, so that the renderer will have correct visibility | 1244 // the |is_hidden_| change, so that the renderer will have correct visibility |
| 1244 // set when respawned. | 1245 // set when respawned. |
| 1245 if (is_hidden_) { | 1246 if (!is_hidden_) { |
| 1246 process_->WidgetRestored(); | 1247 process_->WidgetHidden(); |
| 1247 is_hidden_ = false; | 1248 is_hidden_ = true; |
| 1248 } | 1249 } |
| 1249 | 1250 |
| 1250 // Reset this to ensure the hung renderer mechanism is working properly. | 1251 // Reset this to ensure the hung renderer mechanism is working properly. |
| 1251 in_flight_event_count_ = 0; | 1252 in_flight_event_count_ = 0; |
| 1252 StopHangMonitorTimeout(); | 1253 StopHangMonitorTimeout(); |
| 1253 | 1254 |
| 1254 if (view_) { | 1255 if (view_) { |
| 1255 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, | 1256 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, |
| 1256 gfx::GLSurfaceHandle()); | 1257 gfx::GLSurfaceHandle()); |
| 1257 view_->RenderProcessGone(status, exit_code); | 1258 view_->RenderProcessGone(status, exit_code); |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2128 } | 2129 } |
| 2129 | 2130 |
| 2130 #if defined(OS_WIN) | 2131 #if defined(OS_WIN) |
| 2131 gfx::NativeViewAccessible | 2132 gfx::NativeViewAccessible |
| 2132 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2133 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
| 2133 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2134 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
| 2134 } | 2135 } |
| 2135 #endif | 2136 #endif |
| 2136 | 2137 |
| 2137 } // namespace content | 2138 } // namespace content |
| OLD | NEW |