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

Unified Diff: content/renderer/render_widget.h

Issue 11858007: Splits SmoothGestureController from RenderWidgetHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Single smooth scroll Created 7 years, 10 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/renderer/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 0cc24db061ff679b6afcc2c74979ba2eeeec76e2..a6b41d6109260272f76ffd2647dfaaacbe663c64 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -181,7 +181,7 @@ class CONTENT_EXPORT RenderWidget
// 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.
- void BeginSmoothScroll(bool scroll_down,
+ bool BeginSmoothScroll(bool scroll_down,
const SmoothScrollCompletionCallback& callback,
int pixels_to_scroll,
int mouse_event_x,
@@ -299,7 +299,7 @@ class CONTENT_EXPORT RenderWidget
const gfx::Size& page_size,
const gfx::Size& desired_size);
void OnRepaint(const gfx::Size& size_to_paint);
- void OnSmoothScrollCompleted(int gesture_id);
+ void OnSmoothScrollCompleted();
void OnSetTextDirection(WebKit::WebTextDirection direction);
void OnGetFPS();
void OnScreenInfoChanged(const WebKit::WebScreenInfo& screen_info);
@@ -640,10 +640,7 @@ class CONTENT_EXPORT RenderWidget
bool throttle_input_events_;
// State associated with the BeginSmoothScroll synthetic scrolling function.
- int next_smooth_scroll_gesture_id_;
- typedef std::map<int, SmoothScrollCompletionCallback>
- PendingSmoothScrollGestureMap;
- PendingSmoothScrollGestureMap pending_smooth_scroll_gestures_;
+ SmoothScrollCompletionCallback pending_smooth_scroll_gesture_;
// Specified whether the compositor will run in its own thread.
bool is_threaded_compositing_enabled_;

Powered by Google App Engine
This is Rietveld 408576698