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

Unified Diff: trunk/src/content/browser/renderer_host/render_widget_host_impl.cc

Issue 79143002: Revert 236254 "Replace old with new synthetic gesture framework." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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: trunk/src/content/browser/renderer_host/render_widget_host_impl.cc
===================================================================
--- trunk/src/content/browser/renderer_host/render_widget_host_impl.cc (revision 236262)
+++ trunk/src/content/browser/renderer_host/render_widget_host_impl.cc (working copy)
@@ -31,9 +31,6 @@
#include "content/browser/renderer_host/backing_store_manager.h"
#include "content/browser/renderer_host/dip_util.h"
#include "content/browser/renderer_host/input/immediate_input_router.h"
-#include "content/browser/renderer_host/input/synthetic_gesture.h"
-#include "content/browser/renderer_host/input/synthetic_gesture_controller.h"
-#include "content/browser/renderer_host/input/synthetic_gesture_target.h"
#include "content/browser/renderer_host/overscroll_controller.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
@@ -319,8 +316,6 @@
GpuSurfaceTracker::Get()->SetSurfaceHandle(
surface_id_, gfx::GLSurfaceHandle());
}
-
- synthetic_gesture_controller_.reset();
}
RenderProcessHost* RenderWidgetHostImpl::GetProcess() const {
@@ -389,6 +384,11 @@
waiting_for_screen_rects_ack_ = true;
}
+base::TimeDelta
+ RenderWidgetHostImpl::GetSyntheticGestureMessageInterval() const {
+ return synthetic_gesture_controller_.GetSyntheticGestureMessageInterval();
+}
+
void RenderWidgetHostImpl::SetOverscrollControllerEnabled(bool enabled) {
if (!enabled)
overscroll_controller_.reset();
@@ -402,8 +402,6 @@
void RenderWidgetHostImpl::FlushInput() {
input_router_->Flush();
- if (synthetic_gesture_controller_)
- synthetic_gesture_controller_->Flush(base::TimeTicks::Now());
}
void RenderWidgetHostImpl::SetNeedsFlush() {
@@ -450,8 +448,6 @@
bool handled = true;
bool msg_is_ok = true;
IPC_BEGIN_MESSAGE_MAP_EX(RenderWidgetHostImpl, msg, msg_is_ok)
- IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture,
- OnQueueSyntheticGesture)
IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady)
IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone)
IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose)
@@ -469,6 +465,8 @@
IPC_MESSAGE_HANDLER(ViewHostMsg_DidOverscroll, OnOverscrolled)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_BeginSmoothScroll, OnBeginSmoothScroll)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_BeginPinch, OnBeginPinch)
IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus)
IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor)
@@ -1282,8 +1280,6 @@
}
BackingStoreManager::RemoveBackingStore(this);
-
- synthetic_gesture_controller_.reset();
}
void RenderWidgetHostImpl::UpdateTextDirection(WebTextDirection direction) {
@@ -1716,18 +1712,18 @@
UMA_HISTOGRAM_TIMES("MPArch.RWH_TotalPaintTime", delta);
}
-void RenderWidgetHostImpl::OnQueueSyntheticGesture(
- const SyntheticGesturePacket& gesture_packet) {
- if (!synthetic_gesture_controller_) {
- if (!view_)
- return;
- synthetic_gesture_controller_.reset(
- new SyntheticGestureController(
- view_->CreateSyntheticGestureTarget().Pass()));
- }
+void RenderWidgetHostImpl::OnBeginSmoothScroll(
+ const ViewHostMsg_BeginSmoothScroll_Params& params) {
+ if (!view_)
+ return;
+ synthetic_gesture_controller_.BeginSmoothScroll(view_, params);
+}
- synthetic_gesture_controller_->QueueSyntheticGesture(
- SyntheticGesture::Create(*gesture_packet.gesture_params()));
+void RenderWidgetHostImpl::OnBeginPinch(
+ const ViewHostMsg_BeginPinch_Params& params) {
+ if (!view_)
+ return;
+ synthetic_gesture_controller_.BeginPinch(view_, params);
}
void RenderWidgetHostImpl::OnFocus() {

Powered by Google App Engine
This is Rietveld 408576698