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

Unified Diff: ui/events/test/event_generator.cc

Issue 2454323002: MacViews: Reveal scrollbars when resting on the trackpad. (Closed)
Patch Set: rebase for r432358 Created 4 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
« no previous file with comments | « ui/events/test/event_generator.h ('k') | ui/views/controls/scroll_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/test/event_generator.cc
diff --git a/ui/events/test/event_generator.cc b/ui/events/test/event_generator.cc
index e308463ed606e1f5873676f5ce415b476d033ae4..d9d72a1b56866610028cebbc1e0ccedf998d5735 100644
--- a/ui/events/test/event_generator.cc
+++ b/ui/events/test/event_generator.cc
@@ -550,6 +550,22 @@ void EventGenerator::ScrollSequence(const gfx::Point& start,
Dispatch(&fling_start);
}
+void EventGenerator::GenerateTrackpadRest() {
+ int num_fingers = 2;
+ ui::ScrollEvent scroll(ui::ET_SCROLL, current_location_,
+ ui::EventTimeForNow(), 0, 0, 0, 0, 0, num_fingers,
+ EventMomentumPhase::MAY_BEGIN);
+ Dispatch(&scroll);
+}
+
+void EventGenerator::CancelTrackpadRest() {
+ int num_fingers = 2;
+ ui::ScrollEvent scroll(ui::ET_SCROLL, current_location_,
+ ui::EventTimeForNow(), 0, 0, 0, 0, 0, num_fingers,
+ EventMomentumPhase::END);
+ Dispatch(&scroll);
+}
+
void EventGenerator::PressKey(ui::KeyboardCode key_code, int flags) {
DispatchKeyEvent(true, key_code, flags);
}
« no previous file with comments | « ui/events/test/event_generator.h ('k') | ui/views/controls/scroll_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698