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 "ui/aura/window_event_dispatcher.h" | 5 #include "ui/aura/window_event_dispatcher.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 2315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2326 AsyncWindowDelegate(WindowEventDispatcher* dispatcher) | 2326 AsyncWindowDelegate(WindowEventDispatcher* dispatcher) |
2327 : dispatcher_(dispatcher) {} | 2327 : dispatcher_(dispatcher) {} |
2328 | 2328 |
2329 void set_window(Window* window) { | 2329 void set_window(Window* window) { |
2330 window_ = window; | 2330 window_ = window; |
2331 } | 2331 } |
2332 private: | 2332 private: |
2333 void OnTouchEvent(ui::TouchEvent* event) override { | 2333 void OnTouchEvent(ui::TouchEvent* event) override { |
2334 // Convert touch event back to root window coordinates. | 2334 // Convert touch event back to root window coordinates. |
2335 event->ConvertLocationToTarget(window_, window_->GetRootWindow()); | 2335 event->ConvertLocationToTarget(window_, window_->GetRootWindow()); |
| 2336 event->DisableSynchronousHandling(); |
2336 dispatcher_->ProcessedTouchEvent(event, window_, ui::ER_UNHANDLED); | 2337 dispatcher_->ProcessedTouchEvent(event, window_, ui::ER_UNHANDLED); |
2337 event->StopPropagation(); | 2338 event->StopPropagation(); |
2338 } | 2339 } |
2339 | 2340 |
2340 WindowEventDispatcher* dispatcher_; | 2341 WindowEventDispatcher* dispatcher_; |
2341 Window* window_; | 2342 Window* window_; |
2342 | 2343 |
2343 DISALLOW_COPY_AND_ASSIGN(AsyncWindowDelegate); | 2344 DISALLOW_COPY_AND_ASSIGN(AsyncWindowDelegate); |
2344 }; | 2345 }; |
2345 | 2346 |
(...skipping 25 matching lines...) Expand all Loading... |
2371 ASSERT_EQ(1u, recorder.touch_locations().size()); | 2372 ASSERT_EQ(1u, recorder.touch_locations().size()); |
2372 EXPECT_EQ(gfx::Point(kX - kWindowOffset, kY - kWindowOffset).ToString(), | 2373 EXPECT_EQ(gfx::Point(kX - kWindowOffset, kY - kWindowOffset).ToString(), |
2373 recorder.touch_locations()[0].ToString()); | 2374 recorder.touch_locations()[0].ToString()); |
2374 | 2375 |
2375 ASSERT_EQ(2u, recorder.gesture_locations().size()); | 2376 ASSERT_EQ(2u, recorder.gesture_locations().size()); |
2376 EXPECT_EQ(gfx::Point(kX - kWindowOffset, kY - kWindowOffset).ToString(), | 2377 EXPECT_EQ(gfx::Point(kX - kWindowOffset, kY - kWindowOffset).ToString(), |
2377 recorder.gesture_locations()[0].ToString()); | 2378 recorder.gesture_locations()[0].ToString()); |
2378 } | 2379 } |
2379 | 2380 |
2380 } // namespace aura | 2381 } // namespace aura |
OLD | NEW |