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/timer.h" | 5 #include "base/timer.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 #include "ui/aura/event.h" | 7 #include "ui/aura/event.h" |
8 #include "ui/aura/gestures/gesture_recognizer_aura.h" | 8 #include "ui/aura/gestures/gesture_recognizer_aura.h" |
9 #include "ui/aura/gestures/gesture_sequence.h" | 9 #include "ui/aura/gestures/gesture_sequence.h" |
10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 pinch_begin_ = true; | 112 pinch_begin_ = true; |
113 break; | 113 break; |
114 case ui::ET_GESTURE_PINCH_UPDATE: | 114 case ui::ET_GESTURE_PINCH_UPDATE: |
115 pinch_update_ = true; | 115 pinch_update_ = true; |
116 break; | 116 break; |
117 case ui::ET_GESTURE_PINCH_END: | 117 case ui::ET_GESTURE_PINCH_END: |
118 pinch_end_ = true; | 118 pinch_end_ = true; |
119 break; | 119 break; |
120 case ui::ET_GESTURE_LONG_PRESS: | 120 case ui::ET_GESTURE_LONG_PRESS: |
121 long_press_ = true; | 121 long_press_ = true; |
122 touch_id_ = gesture->delta_x(); | 122 touch_id_ = gesture->point_id(); |
123 break; | 123 break; |
124 default: | 124 default: |
125 NOTREACHED(); | 125 NOTREACHED(); |
126 } | 126 } |
127 return ui::GESTURE_STATUS_CONSUMED; | 127 return ui::GESTURE_STATUS_CONSUMED; |
128 } | 128 } |
129 | 129 |
130 private: | 130 private: |
131 bool tap_; | 131 bool tap_; |
132 bool tap_down_; | 132 bool tap_down_; |
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 new GestureEventConsumeDelegate()); | 1264 new GestureEventConsumeDelegate()); |
1265 | 1265 |
1266 TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), 6); | 1266 TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), 6); |
1267 root_window()->DispatchTouchEvent(&release1); | 1267 root_window()->DispatchTouchEvent(&release1); |
1268 EXPECT_FALSE(delegate->tap()); | 1268 EXPECT_FALSE(delegate->tap()); |
1269 EXPECT_FALSE(delegate->tap_down()); | 1269 EXPECT_FALSE(delegate->tap_down()); |
1270 } | 1270 } |
1271 | 1271 |
1272 } // namespace test | 1272 } // namespace test |
1273 } // namespace aura | 1273 } // namespace aura |
OLD | NEW |