OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/aura/test/event_generator.h" | 5 #include "ui/aura/test/event_generator.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/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "ui/aura/client/screen_position_client.h" | 10 #include "ui/aura/client/screen_position_client.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 : KeyEvent(native_event, is_char) { | 54 : KeyEvent(native_event, is_char) { |
55 set_flags(flags); | 55 set_flags(flags); |
56 } | 56 } |
57 }; | 57 }; |
58 | 58 |
59 class TestTouchEvent : public ui::TouchEvent { | 59 class TestTouchEvent : public ui::TouchEvent { |
60 public: | 60 public: |
61 TestTouchEvent(ui::EventType type, | 61 TestTouchEvent(ui::EventType type, |
62 const gfx::Point& root_location, | 62 const gfx::Point& root_location, |
63 int flags) | 63 int flags) |
64 : TouchEvent(type, root_location, 0, ui::EventTimeForNow()) { | 64 : TouchEvent(type, root_location, flags, 0, ui::EventTimeForNow(), |
65 set_flags(flags); | 65 1.0f, 1.0f, 1.0f, 1.0f) { |
66 } | 66 } |
67 | 67 |
68 private: | 68 private: |
69 DISALLOW_COPY_AND_ASSIGN(TestTouchEvent); | 69 DISALLOW_COPY_AND_ASSIGN(TestTouchEvent); |
70 }; | 70 }; |
71 | 71 |
72 const int kAllButtonMask = ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON; | 72 const int kAllButtonMask = ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON; |
73 | 73 |
74 } // namespace | 74 } // namespace |
75 | 75 |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 base::MessageLoopProxy::current()->PostTask( | 535 base::MessageLoopProxy::current()->PostTask( |
536 FROM_HERE, | 536 FROM_HERE, |
537 base::Bind(&EventGenerator::DispatchNextPendingEvent, | 537 base::Bind(&EventGenerator::DispatchNextPendingEvent, |
538 base::Unretained(this))); | 538 base::Unretained(this))); |
539 } | 539 } |
540 } | 540 } |
541 | 541 |
542 | 542 |
543 } // namespace test | 543 } // namespace test |
544 } // namespace aura | 544 } // namespace aura |
OLD | NEW |