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

Side by Side Diff: ui/base/events/event.cc

Issue 11411247: Support 3f swipe for tab scrubbing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/base/events/event.h" 5 #include "ui/base/events/event.h"
6 6
7 #if defined(USE_X11) 7 #if defined(USE_X11)
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 #endif 9 #endif
10 10
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 data_(data), 498 data_(data),
499 source_operations_(source_operations) { 499 source_operations_(source_operations) {
500 } 500 }
501 501
502 //////////////////////////////////////////////////////////////////////////////// 502 ////////////////////////////////////////////////////////////////////////////////
503 // ScrollEvent 503 // ScrollEvent
504 504
505 ScrollEvent::ScrollEvent(const base::NativeEvent& native_event) 505 ScrollEvent::ScrollEvent(const base::NativeEvent& native_event)
506 : MouseEvent(native_event) { 506 : MouseEvent(native_event) {
507 if (type() == ET_SCROLL) { 507 if (type() == ET_SCROLL) {
508 GetScrollOffsets(native_event, &x_offset_, &y_offset_); 508 GetScrollOffsets(native_event, &x_offset_, &y_offset_, &finger_count_);
509 double start, end; 509 double start, end;
510 GetGestureTimes(native_event, &start, &end); 510 GetGestureTimes(native_event, &start, &end);
511 } else if (type() == ET_SCROLL_FLING_START) { 511 } else if (type() == ET_SCROLL_FLING_START) {
512 bool is_cancel; 512 bool is_cancel;
513 GetFlingData(native_event, &x_offset_, &y_offset_, &is_cancel); 513 GetFlingData(native_event, &x_offset_, &y_offset_, &is_cancel);
514 } 514 }
515 } 515 }
516 516
517 ScrollEvent::ScrollEvent(EventType type, 517 ScrollEvent::ScrollEvent(EventType type,
518 const gfx::Point& location, 518 const gfx::Point& location,
(...skipping 27 matching lines...) Expand all
546 int GestureEvent::GetLowestTouchId() const { 546 int GestureEvent::GetLowestTouchId() const {
547 if (touch_ids_bitfield_ == 0) 547 if (touch_ids_bitfield_ == 0)
548 return -1; 548 return -1;
549 int i = -1; 549 int i = -1;
550 // Find the index of the least significant 1 bit 550 // Find the index of the least significant 1 bit
551 while (!(1 << ++i & touch_ids_bitfield_)); 551 while (!(1 << ++i & touch_ids_bitfield_));
552 return i; 552 return i;
553 } 553 }
554 554
555 } // namespace ui 555 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698