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

Side by Side Diff: ui/events/gesture_detection/mock_motion_event.cc

Issue 342633003: [Android] Select text when stylus first button is pressed. (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 "ui/events/gesture_detection/mock_motion_event.h" 5 #include "ui/events/gesture_detection/mock_motion_event.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 using base::TimeTicks; 9 using base::TimeTicks;
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 float MockMotionEvent::GetHistoricalX(size_t pointer_index, 133 float MockMotionEvent::GetHistoricalX(size_t pointer_index,
134 size_t historical_index) const { 134 size_t historical_index) const {
135 return 0; 135 return 0;
136 } 136 }
137 137
138 float MockMotionEvent::GetHistoricalY(size_t pointer_index, 138 float MockMotionEvent::GetHistoricalY(size_t pointer_index,
139 size_t historical_index) const { 139 size_t historical_index) const {
140 return 0; 140 return 0;
141 } 141 }
142 142
143 bool MockMotionEvent::ShouldConvertToMouseEvent() const {
144 return false;
145 }
146
143 scoped_ptr<MotionEvent> MockMotionEvent::Clone() const { 147 scoped_ptr<MotionEvent> MockMotionEvent::Clone() const {
144 return scoped_ptr<MotionEvent>(new MockMotionEvent(*this)); 148 return scoped_ptr<MotionEvent>(new MockMotionEvent(*this));
145 } 149 }
146 150
147 scoped_ptr<MotionEvent> MockMotionEvent::Cancel() const { 151 scoped_ptr<MotionEvent> MockMotionEvent::Cancel() const {
148 scoped_ptr<MockMotionEvent> cancel_event(new MockMotionEvent(*this)); 152 scoped_ptr<MockMotionEvent> cancel_event(new MockMotionEvent(*this));
149 cancel_event->action = MotionEvent::ACTION_CANCEL; 153 cancel_event->action = MotionEvent::ACTION_CANCEL;
150 return cancel_event.PassAs<MotionEvent>(); 154 return cancel_event.PassAs<MotionEvent>();
151 } 155 }
152 156
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 if (pointer_count > 1) 194 if (pointer_count > 1)
191 --pointer_count; 195 --pointer_count;
192 action = ACTION_CANCEL; 196 action = ACTION_CANCEL;
193 } 197 }
194 198
195 void MockMotionEvent::SetTouchMajor(float new_touch_major) { 199 void MockMotionEvent::SetTouchMajor(float new_touch_major) {
196 touch_major = new_touch_major; 200 touch_major = new_touch_major;
197 } 201 }
198 202
199 } // namespace ui 203 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698