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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1249 ResetSizeAndRepaintPendingFlags(); | 1249 ResetSizeAndRepaintPendingFlags(); |
1250 current_size_.SetSize(0, 0); | 1250 current_size_.SetSize(0, 0); |
1251 // After the renderer crashes, the view is destroyed and so the | 1251 // After the renderer crashes, the view is destroyed and so the |
1252 // RenderWidgetHost cannot track its visibility anymore. We assume such | 1252 // RenderWidgetHost cannot track its visibility anymore. We assume such |
1253 // RenderWidgetHost to be visible for the sake of internal accounting - be | 1253 // RenderWidgetHost to be visible for the sake of internal accounting - be |
1254 // careful about changing this - see http://crbug.com/401859. | 1254 // careful about changing this - see http://crbug.com/401859. |
1255 // | 1255 // |
1256 // We need to at least make sure that the RenderProcessHost is notified about | 1256 // We need to at least make sure that the RenderProcessHost is notified about |
1257 // the |is_hidden_| change, so that the renderer will have correct visibility | 1257 // the |is_hidden_| change, so that the renderer will have correct visibility |
1258 // set when respawned. | 1258 // set when respawned. |
1259 // | |
1260 // http://crbug.com/522795 : On Android, we assume dead RenderWidgetHost to be | |
1261 // invisible to correctly keep the priority of a restored renderer. | |
1262 #if defined(OS_ANDROID) | |
no sievers
2015/09/01 18:30:54
Can we just remove 1260-1272?
Jaekyun Seok (inactive)
2015/09/02 01:25:50
Done.
| |
1263 if (!is_hidden_) { | |
1264 process_->WidgetHidden(); | |
1265 is_hidden_ = true; | |
1266 } | |
1267 #else | |
1259 if (is_hidden_) { | 1268 if (is_hidden_) { |
1260 process_->WidgetRestored(); | 1269 process_->WidgetRestored(); |
1261 is_hidden_ = false; | 1270 is_hidden_ = false; |
1262 } | 1271 } |
1272 #endif | |
1263 | 1273 |
1264 // Reset this to ensure the hung renderer mechanism is working properly. | 1274 // Reset this to ensure the hung renderer mechanism is working properly. |
1265 in_flight_event_count_ = 0; | 1275 in_flight_event_count_ = 0; |
1266 StopHangMonitorTimeout(); | 1276 StopHangMonitorTimeout(); |
1267 | 1277 |
1268 if (view_) { | 1278 if (view_) { |
1269 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, | 1279 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, |
1270 gfx::GLSurfaceHandle()); | 1280 gfx::GLSurfaceHandle()); |
1271 view_->RenderProcessGone(status, exit_code); | 1281 view_->RenderProcessGone(status, exit_code); |
1272 view_ = NULL; // The View should be deleted by RenderProcessGone. | 1282 view_ = NULL; // The View should be deleted by RenderProcessGone. |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2142 } | 2152 } |
2143 | 2153 |
2144 #if defined(OS_WIN) | 2154 #if defined(OS_WIN) |
2145 gfx::NativeViewAccessible | 2155 gfx::NativeViewAccessible |
2146 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2156 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
2147 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2157 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
2148 } | 2158 } |
2149 #endif | 2159 #endif |
2150 | 2160 |
2151 } // namespace content | 2161 } // namespace content |
OLD | NEW |