| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <linux/input.h> | 5 #include <linux/input.h> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // CursorDelegateEvdev: | 49 // CursorDelegateEvdev: |
| 50 void MoveCursorTo(gfx::AcceleratedWidget widget, | 50 void MoveCursorTo(gfx::AcceleratedWidget widget, |
| 51 const gfx::PointF& location) override { | 51 const gfx::PointF& location) override { |
| 52 cursor_location_ = location; | 52 cursor_location_ = location; |
| 53 } | 53 } |
| 54 void MoveCursor(const gfx::Vector2dF& delta) override { | 54 void MoveCursor(const gfx::Vector2dF& delta) override { |
| 55 cursor_location_ = gfx::PointF(delta.x(), delta.y()); | 55 cursor_location_ = gfx::PointF(delta.x(), delta.y()); |
| 56 } | 56 } |
| 57 bool IsCursorVisible() override { return 1; } | 57 bool IsCursorVisible() override { return 1; } |
| 58 gfx::PointF location() override { return cursor_location_; } | 58 gfx::PointF location() override { return cursor_location_; } |
| 59 gfx::PointF root_location() override { return cursor_location_; } |
| 59 | 60 |
| 60 private: | 61 private: |
| 61 // The location of the mock cursor. | 62 // The location of the mock cursor. |
| 62 gfx::PointF cursor_location_; | 63 gfx::PointF cursor_location_; |
| 63 | 64 |
| 64 DISALLOW_COPY_AND_ASSIGN(MockCursorEvdev); | 65 DISALLOW_COPY_AND_ASSIGN(MockCursorEvdev); |
| 65 }; | 66 }; |
| 66 | 67 |
| 67 } // namespace ui | 68 } // namespace ui |
| 68 | 69 |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 {{0, 0}, EV_KEY, BTN_TOUCH, 1}, | 453 {{0, 0}, EV_KEY, BTN_TOUCH, 1}, |
| 453 {{0, 0}, EV_SYN, SYN_REPORT, 0}, | 454 {{0, 0}, EV_SYN, SYN_REPORT, 0}, |
| 454 | 455 |
| 455 {{0, 0}, EV_KEY, BTN_TOUCH, 0}, | 456 {{0, 0}, EV_KEY, BTN_TOUCH, 0}, |
| 456 {{0, 0}, EV_SYN, SYN_REPORT, 0}, | 457 {{0, 0}, EV_SYN, SYN_REPORT, 0}, |
| 457 }; | 458 }; |
| 458 | 459 |
| 459 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); | 460 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); |
| 460 EXPECT_EQ(0u, size()); | 461 EXPECT_EQ(0u, size()); |
| 461 } | 462 } |
| OLD | NEW |