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

Side by Side Diff: content/common/input/synthetic_pointer_action_params.cc

Issue 1707943002: Add SyntheticPointerActionParams used in Chromedriver extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/common/input/synthetic_pointer_action_params.h"
6
7 namespace content {
8
9 // Set the default tap duration to 50ms to lie within the bounds of the Aura
10 // gesture recognizer for identifying clicks (currently 0.01s-0.80s).
11 SyntheticPointerActionParams::SyntheticPointerActionParams() {}
12
13 SyntheticPointerActionParams::SyntheticPointerActionParams(
14 const SyntheticPointerActionParams& other)
15 : SyntheticGestureParams(other),
16 position(other.position),
17 index(other.index),
18 duration_ms(other.duration_ms),
19 pointer_action_type(other.pointer_action_type) {}
20
21 SyntheticPointerActionParams::~SyntheticPointerActionParams() {}
22
23 SyntheticGestureParams::GestureType
24 SyntheticPointerActionParams::GetGestureType() const {
25 return POINTER_ACTION;
26 }
27
28 const SyntheticPointerActionParams* SyntheticPointerActionParams::Cast(
29 const SyntheticGestureParams* gesture_params) {
30 DCHECK(gesture_params);
31 DCHECK_EQ(POINTER_ACTION, gesture_params->GetGestureType());
32 return static_cast<const SyntheticPointerActionParams*>(gesture_params);
33 }
34
35 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698