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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 const gfx::PointF& location) override { | 57 const gfx::PointF& location) override { |
58 cursor_location_ = location; | 58 cursor_location_ = location; |
59 } | 59 } |
60 void MoveCursorTo(const gfx::PointF& location) override { | 60 void MoveCursorTo(const gfx::PointF& location) override { |
61 cursor_location_ = location; | 61 cursor_location_ = location; |
62 } | 62 } |
63 void MoveCursor(const gfx::Vector2dF& delta) override { | 63 void MoveCursor(const gfx::Vector2dF& delta) override { |
64 cursor_location_ = gfx::PointF(delta.x(), delta.y()); | 64 cursor_location_ = gfx::PointF(delta.x(), delta.y()); |
65 } | 65 } |
66 bool IsCursorVisible() override { return 1; } | 66 bool IsCursorVisible() override { return 1; } |
67 gfx::Rect GetCursorDisplayBounds() override { | 67 gfx::Rect GetCursorConfinedBounds() override { |
68 NOTIMPLEMENTED(); | 68 NOTIMPLEMENTED(); |
69 return gfx::Rect(); | 69 return gfx::Rect(); |
70 } | 70 } |
71 gfx::PointF GetLocation() override { return cursor_location_; } | 71 gfx::PointF GetLocation() override { return cursor_location_; } |
72 | 72 |
73 private: | 73 private: |
74 // The location of the mock cursor. | 74 // The location of the mock cursor. |
75 gfx::PointF cursor_location_; | 75 gfx::PointF cursor_location_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(MockCursorEvdev); | 77 DISALLOW_COPY_AND_ASSIGN(MockCursorEvdev); |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 {{0, 0}, EV_KEY, BTN_TOUCH, 1}, | 457 {{0, 0}, EV_KEY, BTN_TOUCH, 1}, |
458 {{0, 0}, EV_SYN, SYN_REPORT, 0}, | 458 {{0, 0}, EV_SYN, SYN_REPORT, 0}, |
459 | 459 |
460 {{0, 0}, EV_KEY, BTN_TOUCH, 0}, | 460 {{0, 0}, EV_KEY, BTN_TOUCH, 0}, |
461 {{0, 0}, EV_SYN, SYN_REPORT, 0}, | 461 {{0, 0}, EV_SYN, SYN_REPORT, 0}, |
462 }; | 462 }; |
463 | 463 |
464 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); | 464 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); |
465 EXPECT_EQ(0u, size()); | 465 EXPECT_EQ(0u, size()); |
466 } | 466 } |
OLD | NEW |