| 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/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 class TestTouchEvent : public ui::TouchEvent { | 43 class TestTouchEvent : public ui::TouchEvent { |
| 44 public: | 44 public: |
| 45 TestTouchEvent(ui::EventType type, | 45 TestTouchEvent(ui::EventType type, |
| 46 const gfx::Point& root_location, | 46 const gfx::Point& root_location, |
| 47 int touch_id, | 47 int touch_id, |
| 48 int flags, | 48 int flags, |
| 49 base::TimeDelta timestamp) | 49 base::TimeDelta timestamp) |
| 50 : TouchEvent(type, root_location, flags, touch_id, timestamp, | 50 : TouchEvent(type, root_location, flags, touch_id, timestamp, |
| 51 1.0f, 1.0f, 0.0f, 0.0f) { | 51 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f) { |
| 52 } | 52 } |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(TestTouchEvent); | 55 DISALLOW_COPY_AND_ASSIGN(TestTouchEvent); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 const int kAllButtonMask = ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON; | 58 const int kAllButtonMask = ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON; |
| 59 | 59 |
| 60 } // namespace | 60 } // namespace |
| 61 | 61 |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 return default_delegate; | 641 return default_delegate; |
| 642 } | 642 } |
| 643 | 643 |
| 644 EventGeneratorDelegate* EventGenerator::delegate() { | 644 EventGeneratorDelegate* EventGenerator::delegate() { |
| 645 return const_cast<EventGeneratorDelegate*>( | 645 return const_cast<EventGeneratorDelegate*>( |
| 646 const_cast<const EventGenerator*>(this)->delegate()); | 646 const_cast<const EventGenerator*>(this)->delegate()); |
| 647 } | 647 } |
| 648 | 648 |
| 649 } // namespace test | 649 } // namespace test |
| 650 } // namespace ui | 650 } // namespace ui |
| OLD | NEW |