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

Unified Diff: trunk/src/content/renderer/render_widget.h

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/renderer/render_widget.h
===================================================================
--- trunk/src/content/renderer/render_widget.h (revision 236262)
+++ trunk/src/content/renderer/render_widget.h (working copy)
@@ -18,7 +18,6 @@
#include "content/common/browser_rendering_stats.h"
#include "content/common/content_export.h"
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
-#include "content/common/input/synthetic_gesture_params.h"
#include "content/renderer/paint_aggregator.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
@@ -179,12 +178,26 @@
// Callback for use with synthetic gestures (e.g. BeginSmoothScroll).
typedef base::Callback<void()> SyntheticGestureCompletionCallback;
- // Send a synthetic gesture to the browser to be queued to the synthetic
- // gesture controller.
- void QueueSyntheticGesture(
- scoped_ptr<SyntheticGestureParams> gesture_params,
- const SyntheticGestureCompletionCallback& callback);
+ // Directs the host to begin a smooth scroll. This scroll should have the same
+ // performance characteristics as a user-initiated scroll. Returns an ID of
+ // the scroll gesture. |mouse_event_x| and |mouse_event_y| are expected to be
+ // in local DIP coordinates.
+ void BeginSmoothScroll(bool scroll_down,
+ const SyntheticGestureCompletionCallback& callback,
+ int pixels_to_scroll,
+ int mouse_event_x,
+ int mouse_event_y);
+ // Directs the host to begin a pinch gesture. This gesture should have the
+ // same performance characteristics as a user-initiated pinch.
+ // |pixels_to_move|, |anchor_x| and |anchor_y| are expected to be in local
+ // DIP coordinates.
+ void BeginPinch(bool zoom_in,
+ int pixels_to_move,
+ int anchor_x,
+ int anchor_y,
+ const SyntheticGestureCompletionCallback& callback);
+
// Close the underlying WebWidget.
virtual void Close();
@@ -743,11 +756,9 @@
// |screen_info_| on some platforms, and defaults to 1 on other platforms.
float device_scale_factor_;
- // State associated with synthetic gestures. Synthetic gestures are processed
- // in-order, so a queue is sufficient to identify the correct state for a
- // completed gesture.
- std::queue<SyntheticGestureCompletionCallback>
- pending_synthetic_gesture_callbacks_;
+ // State associated with the synthetic gestures function
+ // (e.g. BeginSmoothScroll).
+ SyntheticGestureCompletionCallback pending_synthetic_gesture_;
// Specified whether the compositor will run in its own thread.
bool is_threaded_compositing_enabled_;
« no previous file with comments | « trunk/src/content/renderer/gpu/gpu_benchmarking_extension.cc ('k') | trunk/src/content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698