Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: ui/events/ozone/evdev/event_converter_evdev_impl_unittest.cc

Issue 721823002: ozone: Interpret absolute events for graphics tablets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@o
Patch Set: Add missing initialisers for class members on TabletEventConverterEvdev Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class MockCursorEvdev : public CursorDelegateEvdev { 44 class MockCursorEvdev : public CursorDelegateEvdev {
45 public: 45 public:
46 MockCursorEvdev() {} 46 MockCursorEvdev() {}
47 ~MockCursorEvdev() override {} 47 ~MockCursorEvdev() override {}
48 48
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 MoveCursorTo(const gfx::PointF& location) override {
55 cursor_location_ = location;
56 }
54 void MoveCursor(const gfx::Vector2dF& delta) override { 57 void MoveCursor(const gfx::Vector2dF& delta) override {
55 cursor_location_ = gfx::PointF(delta.x(), delta.y()); 58 cursor_location_ = gfx::PointF(delta.x(), delta.y());
56 } 59 }
57 bool IsCursorVisible() override { return 1; } 60 bool IsCursorVisible() override { return 1; }
61 gfx::Rect GetCursorDisplayBounds() override {
62 NOTIMPLEMENTED();
63 return gfx::Rect();
64 }
58 gfx::PointF location() override { return cursor_location_; } 65 gfx::PointF location() override { return cursor_location_; }
59 66
60 private: 67 private:
61 // The location of the mock cursor. 68 // The location of the mock cursor.
62 gfx::PointF cursor_location_; 69 gfx::PointF cursor_location_;
63 70
64 DISALLOW_COPY_AND_ASSIGN(MockCursorEvdev); 71 DISALLOW_COPY_AND_ASSIGN(MockCursorEvdev);
65 }; 72 };
66 73
67 } // namespace ui 74 } // namespace ui
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 {{0, 0}, EV_KEY, BTN_TOUCH, 1}, 459 {{0, 0}, EV_KEY, BTN_TOUCH, 1},
453 {{0, 0}, EV_SYN, SYN_REPORT, 0}, 460 {{0, 0}, EV_SYN, SYN_REPORT, 0},
454 461
455 {{0, 0}, EV_KEY, BTN_TOUCH, 0}, 462 {{0, 0}, EV_KEY, BTN_TOUCH, 0},
456 {{0, 0}, EV_SYN, SYN_REPORT, 0}, 463 {{0, 0}, EV_SYN, SYN_REPORT, 0},
457 }; 464 };
458 465
459 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); 466 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue));
460 EXPECT_EQ(0u, size()); 467 EXPECT_EQ(0u, size());
461 } 468 }
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/cursor_delegate_evdev.h ('k') | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698