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

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: Rename class as we agreed upon, keep correct type of instances (guest/embedder, not helpers) inside… 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 8f658171e611d39e3365897998c31bae22d588d7..5f7836a3e772ee3c432832f3f69258dbaf2a2703 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -234,6 +234,31 @@ void RenderWidgetHostImpl::CompositingSurfaceUpdated() {
process_->SurfaceUpdated(surface_id_);
}
+void RenderWidgetHostImpl::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 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());
@@ -1076,31 +1101,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 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