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

Unified 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: Fix mac build + Address nits from awong@ Created 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index d30948183c6a35459ec47d4e249f9d7ca3fea4f9..61884e488115f6e09f21a1868c0985a3e4625b03 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -235,6 +235,38 @@ void RenderWidgetHostImpl::CompositingSurfaceUpdated() {
process_->SurfaceUpdated(surface_id_);
}
+void RenderWidgetHostImpl::ResetFlags() {
awong 2012/09/06 00:23:27 This kind of laundry list make it easy for future
lazyboy 2012/09/06 04:33:53 I agree, I'll let Fady comment on the ResetFlags()
+ // Must reset these to ensure that mouse move/wheel events work with a new
+ // renderer.
+ mouse_move_pending_ = false;
+ next_mouse_move_.reset();
+ mouse_wheel_pending_ = false;
+ coalesced_mouse_wheel_events_.clear();
+
+ // Must reset these to ensure that SelectRange works with a new renderer.
+ select_range_pending_ = false;
+ next_selection_range_.reset();
+
+ // Must reset these to ensure that gesture events work with a new renderer.
+ gesture_event_filter_->Reset();
+
+ // Must reset these to ensure that keyboard events work with a new renderer.
+ key_queue_.clear();
+ suppress_next_char_events_ = false;
+
+ // Reset some fields in preparation for recovering from a crash.
+ resize_ack_pending_ = false;
+ repaint_ack_pending_ = false;
+
+ in_flight_size_.SetSize(0, 0);
+ current_size_.SetSize(0, 0);
+ is_hidden_ = false;
+ is_accelerated_compositing_active_ = false;
+
+ // Reset this to ensure the hung renderer mechanism is working properly.
+ in_flight_event_count_ = 0;
+}
+
void RenderWidgetHostImpl::Init() {
DCHECK(process_->HasConnection());
@@ -1090,35 +1122,7 @@ void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status,
// from a crashed renderer.
renderer_initialized_ = false;
- // Must reset these to ensure that mouse move/wheel events work with a new
- // renderer.
- mouse_move_pending_ = false;
- next_mouse_move_.reset();
- mouse_wheel_pending_ = false;
- coalesced_mouse_wheel_events_.clear();
-
- // Must reset these to ensure that SelectRange works with a new renderer.
- select_range_pending_ = false;
- next_selection_range_.reset();
-
- // Must reset these to ensure that gesture events work with a new renderer.
- gesture_event_filter_->Reset();
-
- // Must reset these to ensure that keyboard events work with a new renderer.
- key_queue_.clear();
- suppress_next_char_events_ = false;
-
- // Reset some fields in preparation for recovering from a crash.
- resize_ack_pending_ = false;
- repaint_ack_pending_ = false;
-
- in_flight_size_.SetSize(0, 0);
- current_size_.SetSize(0, 0);
- is_hidden_ = false;
- is_accelerated_compositing_active_ = false;
-
- // Reset this to ensure the hung renderer mechanism is working properly.
- in_flight_event_count_ = 0;
+ ResetFlags();
if (view_) {
GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_,

Powered by Google App Engine
This is Rietveld 408576698