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

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: Add a friend to the IPC SyntheticPointerActionParams Created 4 years, 9 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 SyntheticPointerActionParams::SyntheticPointerActionParams() {}
tdresser 2016/03/17 18:25:29 We should make sure to give the members of this cl
10
11 SyntheticPointerActionParams::SyntheticPointerActionParams(
12 PointerActionType type) {
13 pointer_action_type_arg = type;
tdresser 2016/03/17 18:25:29 And here.
14 }
15
16 SyntheticPointerActionParams::SyntheticPointerActionParams(
17 const SyntheticPointerActionParams& other)
18 : SyntheticGestureParams(other) {
19 pointer_action_type_arg = other.pointer_action_type();
20 if (other.pointer_action_type() !=
tdresser 2016/03/17 18:25:29 This might be clearer as a switch statement.
lanwei 2016/03/22 00:33:43 Done.
21 SyntheticGestureParams::PointerActionType::PROCESS)
22 index_arg = other.index();
23 if (other.pointer_action_type() ==
24 SyntheticGestureParams::PointerActionType::PRESS ||
25 other.pointer_action_type() ==
26 SyntheticGestureParams::PointerActionType::MOVE)
27 position_arg = other.position();
28 }
29
30 SyntheticPointerActionParams::~SyntheticPointerActionParams() {}
31
32 SyntheticGestureParams::GestureType
33 SyntheticPointerActionParams::GetGestureType() const {
34 return POINTER_ACTION;
35 }
36
37 const SyntheticPointerActionParams* SyntheticPointerActionParams::Cast(
38 const SyntheticGestureParams* gesture_params) {
39 DCHECK(gesture_params);
40 DCHECK_EQ(POINTER_ACTION, gesture_params->GetGestureType());
41 return static_cast<const SyntheticPointerActionParams*>(gesture_params);
42 }
43
44 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698