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

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

Issue 10868012: Browser Plugin: New Implementation (Browser Side) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master-trial-obrowser
Patch Set: Rework tests to use timeouts instead of waiting indefinitely, not store any Guest* in embedder. Created 8 years, 3 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
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 <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return view_->GetCompositingSurface(); 228 return view_->GetCompositingSurface();
229 return gfx::GLSurfaceHandle(); 229 return gfx::GLSurfaceHandle();
230 } 230 }
231 231
232 void RenderWidgetHostImpl::CompositingSurfaceUpdated() { 232 void RenderWidgetHostImpl::CompositingSurfaceUpdated() {
233 GpuSurfaceTracker::Get()->SetSurfaceHandle( 233 GpuSurfaceTracker::Get()->SetSurfaceHandle(
234 surface_id_, GetCompositingSurface()); 234 surface_id_, GetCompositingSurface());
235 process_->SurfaceUpdated(surface_id_); 235 process_->SurfaceUpdated(surface_id_);
236 } 236 }
237 237
238 void RenderWidgetHostImpl::ResetSizeAndRepaintPendingFlags() {
239 resize_ack_pending_ = false;
240 repaint_ack_pending_ = false;
241 in_flight_size_.SetSize(0, 0);
242 }
243
238 void RenderWidgetHostImpl::Init() { 244 void RenderWidgetHostImpl::Init() {
239 DCHECK(process_->HasConnection()); 245 DCHECK(process_->HasConnection());
240 246
241 renderer_initialized_ = true; 247 renderer_initialized_ = true;
242 248
243 GpuSurfaceTracker::Get()->SetSurfaceHandle( 249 GpuSurfaceTracker::Get()->SetSurfaceHandle(
244 surface_id_, GetCompositingSurface()); 250 surface_id_, GetCompositingSurface());
245 251
246 // Send the ack along with the information on placement. 252 // Send the ack along with the information on placement.
247 Send(new ViewMsg_CreatingNew_ACK(routing_id_, GetNativeViewId())); 253 Send(new ViewMsg_CreatingNew_ACK(routing_id_, GetNativeViewId()));
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 next_selection_range_.reset(); 1114 next_selection_range_.reset();
1109 1115
1110 // Must reset these to ensure that gesture events work with a new renderer. 1116 // Must reset these to ensure that gesture events work with a new renderer.
1111 gesture_event_filter_->Reset(); 1117 gesture_event_filter_->Reset();
1112 1118
1113 // Must reset these to ensure that keyboard events work with a new renderer. 1119 // Must reset these to ensure that keyboard events work with a new renderer.
1114 key_queue_.clear(); 1120 key_queue_.clear();
1115 suppress_next_char_events_ = false; 1121 suppress_next_char_events_ = false;
1116 1122
1117 // Reset some fields in preparation for recovering from a crash. 1123 // Reset some fields in preparation for recovering from a crash.
1118 resize_ack_pending_ = false; 1124 ResetSizeAndRepaintPendingFlags();
1119 repaint_ack_pending_ = false;
1120
1121 in_flight_size_.SetSize(0, 0);
1122 current_size_.SetSize(0, 0); 1125 current_size_.SetSize(0, 0);
1123 is_hidden_ = false; 1126 is_hidden_ = false;
1124 is_accelerated_compositing_active_ = false; 1127 is_accelerated_compositing_active_ = false;
1125 1128
1126 // Reset this to ensure the hung renderer mechanism is working properly. 1129 // Reset this to ensure the hung renderer mechanism is working properly.
1127 in_flight_event_count_ = 0; 1130 in_flight_event_count_ = 0;
1128 1131
1129 if (view_) { 1132 if (view_) {
1130 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, 1133 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_,
1131 gfx::GLSurfaceHandle()); 1134 gfx::GLSurfaceHandle());
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 // indicate that no callback is in progress (i.e. without this line 2050 // indicate that no callback is in progress (i.e. without this line
2048 // DelayedAutoResized will not get called again). 2051 // DelayedAutoResized will not get called again).
2049 new_auto_size_.SetSize(0, 0); 2052 new_auto_size_.SetSize(0, 0);
2050 if (!should_auto_resize_) 2053 if (!should_auto_resize_)
2051 return; 2054 return;
2052 2055
2053 OnRenderAutoResized(new_size); 2056 OnRenderAutoResized(new_size);
2054 } 2057 }
2055 2058
2056 } // namespace content 2059 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698