OLD | NEW |
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 "base/memory/scoped_vector.h" | 5 #include "base/memory/scoped_vector.h" |
6 #include "base/string_number_conversions.h" | 6 #include "base/string_number_conversions.h" |
7 #include "base/timer.h" | 7 #include "base/timer.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "ui/aura/root_window.h" | 9 #include "ui/aura/root_window.h" |
10 #include "ui/aura/test/aura_test_base.h" | 10 #include "ui/aura/test/aura_test_base.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 float scroll_x() const { return scroll_x_; } | 109 float scroll_x() const { return scroll_x_; } |
110 float scroll_y() const { return scroll_y_; } | 110 float scroll_y() const { return scroll_y_; } |
111 int touch_id() const { return touch_id_; } | 111 int touch_id() const { return touch_id_; } |
112 float velocity_x() const { return velocity_x_; } | 112 float velocity_x() const { return velocity_x_; } |
113 float velocity_y() const { return velocity_y_; } | 113 float velocity_y() const { return velocity_y_; } |
114 const gfx::Rect& bounding_box() const { return bounding_box_; } | 114 const gfx::Rect& bounding_box() const { return bounding_box_; } |
115 int tap_count() const { return tap_count_; } | 115 int tap_count() const { return tap_count_; } |
116 | 116 |
117 virtual ui::GestureStatus OnGestureEvent( | 117 virtual ui::GestureStatus OnGestureEvent( |
118 ui::GestureEventImpl* gesture) OVERRIDE { | 118 ui::GestureEvent* gesture) OVERRIDE { |
119 bounding_box_ = gesture->details().bounding_box(); | 119 bounding_box_ = gesture->details().bounding_box(); |
120 switch (gesture->type()) { | 120 switch (gesture->type()) { |
121 case ui::ET_GESTURE_TAP: | 121 case ui::ET_GESTURE_TAP: |
122 tap_location_ = gesture->location(); | 122 tap_location_ = gesture->location(); |
123 tap_count_ = gesture->details().tap_count(); | 123 tap_count_ = gesture->details().tap_count(); |
124 tap_ = true; | 124 tap_ = true; |
125 break; | 125 break; |
126 case ui::ET_GESTURE_TAP_DOWN: | 126 case ui::ET_GESTURE_TAP_DOWN: |
127 tap_down_ = true; | 127 tap_down_ = true; |
128 break; | 128 break; |
(...skipping 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2570 root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2); | 2570 root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2); |
2571 EXPECT_FALSE(delegate->tap()); | 2571 EXPECT_FALSE(delegate->tap()); |
2572 EXPECT_FALSE(delegate->scroll_update()); | 2572 EXPECT_FALSE(delegate->scroll_update()); |
2573 EXPECT_FALSE(delegate->pinch_update()); | 2573 EXPECT_FALSE(delegate->pinch_update()); |
2574 | 2574 |
2575 delegate->Reset(); | 2575 delegate->Reset(); |
2576 } | 2576 } |
2577 | 2577 |
2578 } // namespace test | 2578 } // namespace test |
2579 } // namespace aura | 2579 } // namespace aura |
OLD | NEW |