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_list_params.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 namespace content { |
| 10 |
| 11 SyntheticPointerActionListParams::SyntheticPointerActionListParams() {} |
| 12 |
| 13 SyntheticPointerActionListParams::SyntheticPointerActionListParams( |
| 14 const ParamList& param_list) { |
| 15 params.push_back(param_list); |
| 16 } |
| 17 |
| 18 SyntheticPointerActionListParams::SyntheticPointerActionListParams( |
| 19 const SyntheticPointerActionListParams& other) |
| 20 : SyntheticGestureParams(other), params(other.params) {} |
| 21 |
| 22 SyntheticPointerActionListParams::~SyntheticPointerActionListParams() {} |
| 23 |
| 24 SyntheticGestureParams::GestureType |
| 25 SyntheticPointerActionListParams::GetGestureType() const { |
| 26 return POINTER_ACTION_LIST; |
| 27 } |
| 28 |
| 29 const SyntheticPointerActionListParams* SyntheticPointerActionListParams::Cast( |
| 30 const SyntheticGestureParams* gesture_params) { |
| 31 DCHECK(gesture_params); |
| 32 DCHECK_EQ(POINTER_ACTION_LIST, gesture_params->GetGestureType()); |
| 33 return static_cast<const SyntheticPointerActionListParams*>(gesture_params); |
| 34 } |
| 35 |
| 36 void SyntheticPointerActionListParams::PushPointerActionParams( |
| 37 const SyntheticPointerActionParams& param) { |
| 38 ParamList param_list; |
| 39 param_list.push_back(param); |
| 40 params.push_back(param_list); |
| 41 } |
| 42 |
| 43 void SyntheticPointerActionListParams::PushPointerActionParamsList( |
| 44 const ParamList& param_list) { |
| 45 params.push_back(param_list); |
| 46 } |
| 47 |
| 48 } // namespace content |
OLD | NEW |