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

Unified Diff: client/touch/Scroller.dart

Issue 8404013: Add constructors to all the event classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regenerate release/html. Created 9 years, 2 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
« no previous file with comments | « client/touch/Scrollbar.dart ('k') | client/touch/TouchUtil.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/touch/Scroller.dart
diff --git a/client/touch/Scroller.dart b/client/touch/Scroller.dart
index cb2823e99668725404f26d5e9d2526c5884f7436..dc2738a2e5cb78e36d570a4af2e640a40535cf78 100644
--- a/client/touch/Scroller.dart
+++ b/client/touch/Scroller.dart
@@ -320,8 +320,7 @@ class Scroller implements Draggable, MomentumDelegate {
snappedTarget,
decelerationFactor),
decelerationFactor);
- onDecelStart.dispatch(
- EventUtil.createEvent(ScrollerEventType.DECEL_START));
+ onDecelStart.dispatch(new Event(ScrollerEventType.DECEL_START));
return true;
} else {
return false;
@@ -430,8 +429,7 @@ class Scroller implements Draggable, MomentumDelegate {
void onDecelerationEnd() {
_setWebkitTransition(_element, 0);
- onScrollerEnd.dispatch(
- EventUtil.createEvent(ScrollerEventType.SCROLLER_END));
+ onScrollerEnd.dispatch(new Event(ScrollerEventType.SCROLLER_END));
_started = false;
}
@@ -445,17 +443,14 @@ class Scroller implements Draggable, MomentumDelegate {
}
}
- onScrollerDragEnd.dispatch(
- EventUtil.createEvent(ScrollerEventType.DRAG_END));
+ onScrollerDragEnd.dispatch(new Event(ScrollerEventType.DRAG_END));
if (!decelerating) {
_snapContentOffsetToBounds();
- onScrollerEnd.dispatch(
- EventUtil.createEvent(ScrollerEventType.SCROLLER_END));
+ onScrollerEnd.dispatch(new Event(ScrollerEventType.SCROLLER_END));
_started = false;
} else {
- onDecelStart.dispatch(
- EventUtil.createEvent(ScrollerEventType.DECEL_START));
+ onDecelStart.dispatch(new Event(ScrollerEventType.DECEL_START));
}
_activeGesture = false;
}
@@ -479,8 +474,7 @@ class Scroller implements Draggable, MomentumDelegate {
}
if (!_started) {
_started = true;
- onScrollerStart.dispatch(
- EventUtil.createEvent(ScrollerEventType.SCROLLER_START));
+ onScrollerStart.dispatch(new Event(ScrollerEventType.SCROLLER_START));
}
_setContentOffset(newX, newY);
}
@@ -579,8 +573,7 @@ class Scroller implements Draggable, MomentumDelegate {
_contentOffset.x = x;
_contentOffset.y = y;
_setOffsetFunction(_element, x, y);
- onContentMoved.dispatch(
- EventUtil.createEvent(ScrollerEventType.CONTENT_MOVED));
+ onContentMoved.dispatch(new Event(ScrollerEventType.CONTENT_MOVED));
}
/**
« no previous file with comments | « client/touch/Scrollbar.dart ('k') | client/touch/TouchUtil.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698