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

Side by Side Diff: content/browser/renderer_host/input/motion_event_web.cc

Issue 348813002: Extend MotionEvent to have tool type and button state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698