diff options
author | vollick@google.com <vollick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-17 03:48:35 +0000 |
---|---|---|
committer | vollick@google.com <vollick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-17 03:48:35 +0000 |
commit | 82480d15af315d31401271617b2764617607ca24 (patch) | |
tree | 279eba0ba7212b82c08070a35ead3b77cf42130a /ui/views/events | |
parent | a7826751a6148308e774797db2f9842ec1cdefa1 (diff) | |
download | chromium_src-82480d15af315d31401271617b2764617607ca24.zip chromium_src-82480d15af315d31401271617b2764617607ca24.tar.gz chromium_src-82480d15af315d31401271617b2764617607ca24.tar.bz2 |
Revert 117869 - Initial views touchui Gesture Recognizer support
This is just a merge of Gajen's patch (http://codereview.chromium.org/8364039/) with ToT.
BUG=101645
TEST=views_unittest
Review URL: http://codereview.chromium.org/9076002
TBR=vollick@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9231013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/events')
-rw-r--r-- | ui/views/events/event.cc | 37 | ||||
-rw-r--r-- | ui/views/events/event.h | 39 |
2 files changed, 2 insertions, 74 deletions
diff --git a/ui/views/events/event.cc b/ui/views/events/event.cc index e6c7a0d..af97208 100644 --- a/ui/views/events/event.cc +++ b/ui/views/events/event.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -201,39 +201,4 @@ const int MouseWheelEvent::kWheelDelta = 120; // This value matches GTK+ wheel scroll amount. const int MouseWheelEvent::kWheelDelta = 53; #endif - -//////////////////////////////////////////////////////////////////////////////// -// GestureEvent, public: - -GestureEvent::GestureEvent(ui::EventType type, - int x, - int y, - int flags, - base::Time time_stamp, - float delta_x, - float delta_y) - : LocatedEvent(type, gfx::Point(x, y), flags), - delta_x_(delta_x), - delta_y_(delta_y) { - set_time_stamp(time_stamp); -} - -GestureEvent::GestureEvent(const GestureEvent& model, View* source, - View* target) - : LocatedEvent(model, source, target), - delta_x_(model.delta_x_), - delta_y_(model.delta_y_) { - set_time_stamp(model.time_stamp()); -} - -//////////////////////////////////////////////////////////////////////////////// -// GestureEvent, private: - -GestureEvent::GestureEvent(const GestureEvent& model, View* root) - : LocatedEvent(model, root), - delta_x_(model.delta_x_), - delta_y_(model.delta_y_) { - set_time_stamp(model.time_stamp()); -} - } // namespace views diff --git a/ui/views/events/event.h b/ui/views/events/event.h index fcdb7d5..640e991 100644 --- a/ui/views/events/event.h +++ b/ui/views/events/event.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -62,10 +62,6 @@ class VIEWS_EXPORT Event { #endif ui::EventType type() const { return type_; } const base::Time& time_stamp() const { return time_stamp_; } - - // Required for Gesture testing purposes. - void set_time_stamp(base::Time time_stamp) { time_stamp_ = time_stamp; } - int flags() const { return flags_; } void set_flags(int flags) { flags_ = flags; } @@ -423,39 +419,6 @@ class VIEWS_EXPORT ScrollEvent : public MouseEvent { DISALLOW_COPY_AND_ASSIGN(ScrollEvent); }; -//////////////////////////////////////////////////////////////////////////////// -// GestureEvent class -// -//////////////////////////////////////////////////////////////////////////////// -class VIEWS_EXPORT GestureEvent : public LocatedEvent { - public: - GestureEvent(ui::EventType type, - int x, - int y, - int flags, - base::Time time_stamp, - float delta_x, - float delta_y); - - // Create a new GestureEvent which is identical to the provided model. - // If source / target views are provided, the model location will be converted - // from |source| coordinate system to |target| coordinate system. - GestureEvent(const GestureEvent& model, View* source, View* target); - - float delta_x() const { return delta_x_; } - float delta_y() const { return delta_y_; } - - private: - friend class internal::RootView; - - GestureEvent(const GestureEvent& model, View* root); - - float delta_x_; - float delta_y_; - - DISALLOW_COPY_AND_ASSIGN(GestureEvent); -}; - } // namespace views #endif // UI_VIEWS_EVENTS_EVENT_H_ |