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

Side by Side Diff: ui/events/test/event_generator.h

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 unified diff | Download patch
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_TEST_EVENT_GENERATOR_H_ 5 #ifndef UI_EVENTS_TEST_EVENT_GENERATOR_H_
6 #define UI_EVENTS_TEST_EVENT_GENERATOR_H_ 6 #define UI_EVENTS_TEST_EVENT_GENERATOR_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 int steps, 343 int steps,
344 int num_fingers); 344 int num_fingers);
345 345
346 // Generates scroll sequences of a FlingCancel, Scrolls, FlingStart, sending 346 // Generates scroll sequences of a FlingCancel, Scrolls, FlingStart, sending
347 // scrolls of each of the values in |offsets|. 347 // scrolls of each of the values in |offsets|.
348 void ScrollSequence(const gfx::Point& start, 348 void ScrollSequence(const gfx::Point& start,
349 const base::TimeDelta& step_delay, 349 const base::TimeDelta& step_delay,
350 const std::vector<gfx::PointF>& offsets, 350 const std::vector<gfx::PointF>& offsets,
351 int num_fingers); 351 int num_fingers);
352 352
353 // Generate a TrackPad "rest" event. That is, a user resting fingers on the
354 // trackpad without moving. This may then be followed by a ScrollSequence(),
355 // or a CancelTrackpadRest().
356 void GenerateTrackpadRest();
357
358 // Cancels a previous GenerateTrackpadRest(). That is, a user lifting fingers
359 // from the trackpad without having moved them in any direction.
360 void CancelTrackpadRest();
361
353 // Generates a key press event. On platforms except Windows and X11, a key 362 // Generates a key press event. On platforms except Windows and X11, a key
354 // event without native_event() is generated. Note that ui::EF_ flags should 363 // event without native_event() is generated. Note that ui::EF_ flags should
355 // be passed as |flags|, not the native ones like 'ShiftMask' in <X11/X.h>. 364 // be passed as |flags|, not the native ones like 'ShiftMask' in <X11/X.h>.
356 // TODO(yusukes): Support native_event() on all platforms. 365 // TODO(yusukes): Support native_event() on all platforms.
357 void PressKey(KeyboardCode key_code, int flags); 366 void PressKey(KeyboardCode key_code, int flags);
358 367
359 // Generates a key release event. On platforms except Windows and X11, a key 368 // Generates a key release event. On platforms except Windows and X11, a key
360 // event without native_event() is generated. Note that ui::EF_ flags should 369 // event without native_event() is generated. Note that ui::EF_ flags should
361 // be passed as |flags|, not the native ones like 'ShiftMask' in <X11/X.h>. 370 // be passed as |flags|, not the native ones like 'ShiftMask' in <X11/X.h>.
362 // TODO(yusukes): Support native_event() on all platforms. 371 // TODO(yusukes): Support native_event() on all platforms.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 bool targeting_application_; 413 bool targeting_application_;
405 std::unique_ptr<base::TickClock> tick_clock_; 414 std::unique_ptr<base::TickClock> tick_clock_;
406 415
407 DISALLOW_COPY_AND_ASSIGN(EventGenerator); 416 DISALLOW_COPY_AND_ASSIGN(EventGenerator);
408 }; 417 };
409 418
410 } // namespace test 419 } // namespace test
411 } // namespace ui 420 } // namespace ui
412 421
413 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_ 422 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_
OLDNEW
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698