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/test/event_generator.h" | 5 #include "ui/events/test/event_generator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 }; | 40 }; |
41 | 41 |
42 class TestTouchEvent : public ui::TouchEvent { | 42 class TestTouchEvent : public ui::TouchEvent { |
43 public: | 43 public: |
44 TestTouchEvent(ui::EventType type, | 44 TestTouchEvent(ui::EventType type, |
45 const gfx::Point& root_location, | 45 const gfx::Point& root_location, |
46 int touch_id, | 46 int touch_id, |
47 int flags, | 47 int flags, |
48 base::TimeDelta timestamp) | 48 base::TimeDelta timestamp) |
49 : TouchEvent(type, root_location, flags, touch_id, timestamp, | 49 : TouchEvent(type, root_location, flags, touch_id, timestamp, |
50 1.0f, 1.0f, 1.0f, 1.0f) { | 50 1.0f, 1.0f, 0.0f, 0.0f) { |
51 } | 51 } |
52 | 52 |
53 private: | 53 private: |
54 DISALLOW_COPY_AND_ASSIGN(TestTouchEvent); | 54 DISALLOW_COPY_AND_ASSIGN(TestTouchEvent); |
55 }; | 55 }; |
56 | 56 |
57 const int kAllButtonMask = ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON; | 57 const int kAllButtonMask = ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON; |
58 | 58 |
59 } // namespace | 59 } // namespace |
60 | 60 |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 return default_delegate; | 626 return default_delegate; |
627 } | 627 } |
628 | 628 |
629 EventGeneratorDelegate* EventGenerator::delegate() { | 629 EventGeneratorDelegate* EventGenerator::delegate() { |
630 return const_cast<EventGeneratorDelegate*>( | 630 return const_cast<EventGeneratorDelegate*>( |
631 const_cast<const EventGenerator*>(this)->delegate()); | 631 const_cast<const EventGenerator*>(this)->delegate()); |
632 } | 632 } |
633 | 633 |
634 } // namespace test | 634 } // namespace test |
635 } // namespace ui | 635 } // namespace ui |
OLD | NEW |