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

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

Issue 567783002: Add modifier flags to MotionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove MotionEvent modifiers Created 6 years, 3 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/motion_event_buffer.h" 5 #include "ui/events/gesture_detection/motion_event_buffer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "ui/events/gesture_detection/motion_event.h" 8 #include "ui/events/gesture_detection/motion_event.h"
9 #include "ui/events/gesture_detection/motion_event_generic.h" 9 #include "ui/events/gesture_detection/motion_event_generic.h"
10 10
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 225
226 virtual ToolType GetToolType(size_t pointer_index) const OVERRIDE { 226 virtual ToolType GetToolType(size_t pointer_index) const OVERRIDE {
227 return latest().GetToolType(pointer_index); 227 return latest().GetToolType(pointer_index);
228 } 228 }
229 229
230 virtual int GetButtonState() const OVERRIDE { 230 virtual int GetButtonState() const OVERRIDE {
231 return latest().GetButtonState(); 231 return latest().GetButtonState();
232 } 232 }
233 233
234 virtual int GetFlags() const OVERRIDE { return latest().GetFlags(); }
235
234 virtual base::TimeTicks GetEventTime() const OVERRIDE { 236 virtual base::TimeTicks GetEventTime() const OVERRIDE {
235 return latest().GetEventTime(); 237 return latest().GetEventTime();
236 } 238 }
237 239
238 virtual size_t GetHistorySize() const OVERRIDE { return events_.size() - 1; } 240 virtual size_t GetHistorySize() const OVERRIDE { return events_.size() - 1; }
239 241
240 virtual base::TimeTicks GetHistoricalEventTime( 242 virtual base::TimeTicks GetHistoricalEventTime(
241 size_t historical_index) const OVERRIDE { 243 size_t historical_index) const OVERRIDE {
242 DCHECK_LT(historical_index, GetHistorySize()); 244 DCHECK_LT(historical_index, GetHistorySize());
243 return events_[historical_index]->GetEventTime(); 245 return events_[historical_index]->GetEventTime();
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 events.weak_clear(); 455 events.weak_clear();
454 client_->ForwardMotionEvent(*event); 456 client_->ForwardMotionEvent(*event);
455 return; 457 return;
456 } 458 }
457 459
458 CompoundMotionEvent compound_event(events.Pass()); 460 CompoundMotionEvent compound_event(events.Pass());
459 client_->ForwardMotionEvent(compound_event); 461 client_->ForwardMotionEvent(compound_event);
460 } 462 }
461 463
462 } // namespace ui 464 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/motion_event.h ('k') | ui/events/gesture_detection/motion_event_generic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698