| OLD | NEW |
| 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 // MSVC++ requires this to be set before any other includes to get M_PI. | 5 // MSVC++ requires this to be set before any other includes to get M_PI. |
| 6 #define _USE_MATH_DEFINES | 6 #define _USE_MATH_DEFINES |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/input/motion_event_web.h" | 8 #include "content/browser/renderer_host/input/motion_event_web.h" |
| 9 | 9 |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 cached_action_index_(GetActionIndexFrom(event)) { | 66 cached_action_index_(GetActionIndexFrom(event)) { |
| 67 DCHECK_GT(GetPointerCount(), 0U); | 67 DCHECK_GT(GetPointerCount(), 0U); |
| 68 } | 68 } |
| 69 | 69 |
| 70 MotionEventWeb::~MotionEventWeb() {} | 70 MotionEventWeb::~MotionEventWeb() {} |
| 71 | 71 |
| 72 int MotionEventWeb::GetId() const { | 72 int MotionEventWeb::GetId() const { |
| 73 return 0; | 73 return 0; |
| 74 } | 74 } |
| 75 | 75 |
| 76 uint32 MotionEventWeb::GetUniqueId() const { |
| 77 return 0; |
| 78 } |
| 79 |
| 76 MotionEventWeb::Action MotionEventWeb::GetAction() const { | 80 MotionEventWeb::Action MotionEventWeb::GetAction() const { |
| 77 return cached_action_; | 81 return cached_action_; |
| 78 } | 82 } |
| 79 | 83 |
| 80 int MotionEventWeb::GetActionIndex() const { | 84 int MotionEventWeb::GetActionIndex() const { |
| 81 DCHECK(cached_action_ == ACTION_POINTER_UP || | 85 DCHECK(cached_action_ == ACTION_POINTER_UP || |
| 82 cached_action_ == ACTION_POINTER_DOWN) | 86 cached_action_ == ACTION_POINTER_DOWN) |
| 83 << "Invalid action for GetActionIndex(): " << cached_action_; | 87 << "Invalid action for GetActionIndex(): " << cached_action_; |
| 84 DCHECK_GE(cached_action_index_, 0); | 88 DCHECK_GE(cached_action_index_, 0); |
| 85 DCHECK_LT(cached_action_index_, static_cast<int>(event_.touchesLength)); | 89 DCHECK_LT(cached_action_index_, static_cast<int>(event_.touchesLength)); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 167 |
| 164 int MotionEventWeb::GetButtonState() const { | 168 int MotionEventWeb::GetButtonState() const { |
| 165 return 0; | 169 return 0; |
| 166 } | 170 } |
| 167 | 171 |
| 168 int MotionEventWeb::GetFlags() const { | 172 int MotionEventWeb::GetFlags() const { |
| 169 return WebEventModifiersToEventFlags(event_.modifiers); | 173 return WebEventModifiersToEventFlags(event_.modifiers); |
| 170 } | 174 } |
| 171 | 175 |
| 172 } // namespace content | 176 } // namespace content |
| OLD | NEW |