Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| OLD | NEW |