Chromium Code Reviews| 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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 visible 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. |
| 1241 // | 1241 // |
| 1242 // We need to at least make sure that the RenderProcessHost is notified about | 1242 // 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 | 1243 // the |is_hidden_| change, so that the renderer will have correct visibility |
| 1244 // set when respawned. | 1244 // set when respawned. |
| 1245 // | |
| 1246 // http://crbug.com/522795 : On Android, we assume dead RenderWidgetHost to be | |
| 1247 // invisible to correctly keep the priority of a restored renderer. | |
| 1248 #if defined(OS_ANDROID) | |
|
no sievers
2015/09/04 16:18:03
We don't need the ifdef, since the your change for
Jaekyun Seok (inactive)
2015/09/07 07:40:04
Done.
| |
| 1249 if (!is_hidden_) { | |
| 1250 process_->WidgetHidden(); | |
| 1251 is_hidden_ = true; | |
| 1252 } | |
| 1253 #else | |
| 1245 if (is_hidden_) { | 1254 if (is_hidden_) { |
| 1246 process_->WidgetRestored(); | 1255 process_->WidgetRestored(); |
| 1247 is_hidden_ = false; | 1256 is_hidden_ = false; |
| 1248 } | 1257 } |
| 1258 #endif | |
| 1249 | 1259 |
| 1250 // Reset this to ensure the hung renderer mechanism is working properly. | 1260 // Reset this to ensure the hung renderer mechanism is working properly. |
| 1251 in_flight_event_count_ = 0; | 1261 in_flight_event_count_ = 0; |
| 1252 StopHangMonitorTimeout(); | 1262 StopHangMonitorTimeout(); |
| 1253 | 1263 |
| 1254 if (view_) { | 1264 if (view_) { |
| 1255 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, | 1265 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, |
| 1256 gfx::GLSurfaceHandle()); | 1266 gfx::GLSurfaceHandle()); |
| 1257 view_->RenderProcessGone(status, exit_code); | 1267 view_->RenderProcessGone(status, exit_code); |
| 1258 view_ = NULL; // The View should be deleted by RenderProcessGone. | 1268 view_ = NULL; // The View should be deleted by RenderProcessGone. |
| (...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2128 } | 2138 } |
| 2129 | 2139 |
| 2130 #if defined(OS_WIN) | 2140 #if defined(OS_WIN) |
| 2131 gfx::NativeViewAccessible | 2141 gfx::NativeViewAccessible |
| 2132 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2142 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
| 2133 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2143 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
| 2134 } | 2144 } |
| 2135 #endif | 2145 #endif |
| 2136 | 2146 |
| 2137 } // namespace content | 2147 } // namespace content |
| OLD | NEW |