Chromium Code Reviews| 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 #include "content/browser/renderer_host/input/motion_event_web.h" | 5 #include "content/browser/renderer_host/input/motion_event_web.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/common/input/web_touch_event_traits.h" | 8 #include "content/common/input/web_touch_event_traits.h" |
| 9 | 9 |
| 10 using blink::WebInputEvent; | 10 using blink::WebInputEvent; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 NOTIMPLEMENTED(); | 136 NOTIMPLEMENTED(); |
| 137 return 0.f; | 137 return 0.f; |
| 138 } | 138 } |
| 139 | 139 |
| 140 float MotionEventWeb::GetHistoricalY(size_t pointer_index, | 140 float MotionEventWeb::GetHistoricalY(size_t pointer_index, |
| 141 size_t historical_index) const { | 141 size_t historical_index) const { |
| 142 NOTIMPLEMENTED(); | 142 NOTIMPLEMENTED(); |
| 143 return 0.f; | 143 return 0.f; |
| 144 } | 144 } |
| 145 | 145 |
| 146 ui::MotionEvent::ToolType MotionEventWeb::GetToolType( | |
| 147 size_t pointer_index) const { | |
| 148 NOTIMPLEMENTED(); | |
| 149 return ui::MotionEvent::TOOL_TYPE_UNKNOWN; | |
|
jdduke (slow)
2014/06/20 21:19:41
Nit: No need for ui::MotionEvent:: prefix here.
Changwan Ryu
2014/06/20 21:32:01
Done.
| |
| 150 } | |
| 151 | |
| 152 int MotionEventWeb::GetButtonState() const { | |
| 153 NOTIMPLEMENTED(); | |
| 154 return 0; | |
| 155 } | |
| 156 | |
| 146 scoped_ptr<ui::MotionEvent> MotionEventWeb::Clone() const { | 157 scoped_ptr<ui::MotionEvent> MotionEventWeb::Clone() const { |
| 147 return scoped_ptr<MotionEvent>(new MotionEventWeb(event_)); | 158 return scoped_ptr<MotionEvent>(new MotionEventWeb(event_)); |
| 148 } | 159 } |
| 149 | 160 |
| 150 scoped_ptr<ui::MotionEvent> MotionEventWeb::Cancel() const { | 161 scoped_ptr<ui::MotionEvent> MotionEventWeb::Cancel() const { |
| 151 WebTouchEvent cancel_event(event_); | 162 WebTouchEvent cancel_event(event_); |
| 152 WebTouchEventTraits::ResetTypeAndTouchStates( | 163 WebTouchEventTraits::ResetTypeAndTouchStates( |
| 153 blink::WebInputEvent::TouchCancel, | 164 blink::WebInputEvent::TouchCancel, |
| 154 // TODO(rbyers): Shouldn't we use a fresh timestamp? | 165 // TODO(rbyers): Shouldn't we use a fresh timestamp? |
| 155 event_.timeStampSeconds, | 166 event_.timeStampSeconds, |
| 156 &cancel_event); | 167 &cancel_event); |
| 157 return scoped_ptr<MotionEvent>(new MotionEventWeb(cancel_event)); | 168 return scoped_ptr<MotionEvent>(new MotionEventWeb(cancel_event)); |
| 158 } | 169 } |
| 159 | 170 |
| 160 } // namespace content | 171 } // namespace content |
| OLD | NEW |