Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 459613007: Fix for renderer visibility on Android that doesn't break Aura and Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 renderer_initialized_ = false; 1191 renderer_initialized_ = false;
1192 1192
1193 waiting_for_screen_rects_ack_ = false; 1193 waiting_for_screen_rects_ack_ = false;
1194 1194
1195 // Must reset these to ensure that keyboard events work with a new renderer. 1195 // Must reset these to ensure that keyboard events work with a new renderer.
1196 suppress_next_char_events_ = false; 1196 suppress_next_char_events_ = false;
1197 1197
1198 // Reset some fields in preparation for recovering from a crash. 1198 // Reset some fields in preparation for recovering from a crash.
1199 ResetSizeAndRepaintPendingFlags(); 1199 ResetSizeAndRepaintPendingFlags();
1200 current_size_.SetSize(0, 0); 1200 current_size_.SetSize(0, 0);
1201 // After the renderer crashes, the view is destroyed and so the
1202 // RenderWidgetHost cannot track its visibility anymore. We assume such
1203 // RenderWidgetHost to be visible for the sake of internal accounting - be
1204 // careful about changing this - see http://crbug.com/401859.
1205 //
1206 // We need to at least make sure that the RenderProcessHost is notified about
1207 // the |is_hidden_| change, so that the renderer will have correct visibility
1208 // set when respawned.
1209 if (!is_hidden_) {
1210 process_->WidgetRestored();
1211 is_hidden_ = false;
1212 }
1201 1213
1202 // Reset this to ensure the hung renderer mechanism is working properly. 1214 // Reset this to ensure the hung renderer mechanism is working properly.
1203 in_flight_event_count_ = 0; 1215 in_flight_event_count_ = 0;
1204 1216
1205 if (view_) { 1217 if (view_) {
1206 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, 1218 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_,
1207 gfx::GLSurfaceHandle()); 1219 gfx::GLSurfaceHandle());
1208 view_->RenderProcessGone(status, exit_code); 1220 view_->RenderProcessGone(status, exit_code);
1209 view_ = NULL; // The View should be deleted by RenderProcessGone. 1221 view_ = NULL; // The View should be deleted by RenderProcessGone.
1210 } 1222 }
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2317 } 2329 }
2318 #endif 2330 #endif
2319 2331
2320 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { 2332 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() {
2321 if (view_) 2333 if (view_)
2322 return view_->PreferredReadbackFormat(); 2334 return view_->PreferredReadbackFormat();
2323 return kN32_SkColorType; 2335 return kN32_SkColorType;
2324 } 2336 }
2325 2337
2326 } // namespace content 2338 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698