| 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 "ui/events/ozone/evdev/event_converter_evdev_impl.h" | 5 #include "ui/events/ozone/evdev/event_converter_evdev_impl.h" |
| 6 | 6 |
| 7 #include <linux/input.h> | 7 #include <linux/input.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 } | 66 } |
| 67 void MoveCursor(const gfx::Vector2dF& delta) override { | 67 void MoveCursor(const gfx::Vector2dF& delta) override { |
| 68 cursor_location_ = gfx::PointF(delta.x(), delta.y()); | 68 cursor_location_ = gfx::PointF(delta.x(), delta.y()); |
| 69 } | 69 } |
| 70 bool IsCursorVisible() override { return 1; } | 70 bool IsCursorVisible() override { return 1; } |
| 71 gfx::Rect GetCursorConfinedBounds() override { | 71 gfx::Rect GetCursorConfinedBounds() override { |
| 72 NOTIMPLEMENTED(); | 72 NOTIMPLEMENTED(); |
| 73 return gfx::Rect(); | 73 return gfx::Rect(); |
| 74 } | 74 } |
| 75 gfx::PointF GetLocation() override { return cursor_location_; } | 75 gfx::PointF GetLocation() override { return cursor_location_; } |
| 76 | 76 void InitializeOnEvdev() override {} |
| 77 private: | 77 private: |
| 78 // The location of the mock cursor. | 78 // The location of the mock cursor. |
| 79 gfx::PointF cursor_location_; | 79 gfx::PointF cursor_location_; |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(MockCursorEvdev); | 81 DISALLOW_COPY_AND_ASSIGN(MockCursorEvdev); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace ui | 84 } // namespace ui |
| 85 | 85 |
| 86 // Test fixture. | 86 // Test fixture. |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 dev->SetKeyFilter(true /* enable_filter */, allowed_keys); | 659 dev->SetKeyFilter(true /* enable_filter */, allowed_keys); |
| 660 ASSERT_EQ(1u, size()); | 660 ASSERT_EQ(1u, size()); |
| 661 event = dispatched_event(0); | 661 event = dispatched_event(0); |
| 662 EXPECT_EQ(ui::ET_KEY_RELEASED, event->type()); | 662 EXPECT_EQ(ui::ET_KEY_RELEASED, event->type()); |
| 663 | 663 |
| 664 // The real key release should be dropped, whenever it comes. | 664 // The real key release should be dropped, whenever it comes. |
| 665 ClearDispatchedEvents(); | 665 ClearDispatchedEvents(); |
| 666 dev->ProcessEvents(key_release, arraysize(key_release)); | 666 dev->ProcessEvents(key_release, arraysize(key_release)); |
| 667 ASSERT_EQ(0u, size()); | 667 ASSERT_EQ(0u, size()); |
| 668 } | 668 } |
| OLD | NEW |