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 <stddef.h> | 5 #include <stddef.h> |
6 #include <X11/extensions/shape.h> | 6 #include <X11/extensions/shape.h> |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 // Get rid of X11 macros which conflict with gtest. | 12 // Get rid of X11 macros which conflict with gtest. |
13 // It is necessary to include this header before the rest so that Bool can be | 13 // It is necessary to include this header before the rest so that Bool can be |
14 // undefined. | 14 // undefined. |
15 #include "ui/events/test/events_test_utils_x11.h" | 15 #include "ui/events/test/events_test_utils_x11.h" |
16 #undef Bool | 16 #undef Bool |
17 #undef None | 17 #undef None |
18 | 18 |
19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
20 #include "base/macros.h" | 20 #include "base/macros.h" |
| 21 #include "base/memory/ptr_util.h" |
21 #include "base/run_loop.h" | 22 #include "base/run_loop.h" |
22 #include "ui/aura/window.h" | 23 #include "ui/aura/window.h" |
23 #include "ui/aura/window_tree_host.h" | 24 #include "ui/aura/window_tree_host.h" |
24 #include "ui/base/hit_test.h" | 25 #include "ui/base/hit_test.h" |
25 #include "ui/base/x/x11_util.h" | 26 #include "ui/base/x/x11_util.h" |
26 #include "ui/display/display_switches.h" | 27 #include "ui/display/display_switches.h" |
27 #include "ui/events/devices/x11/touch_factory_x11.h" | 28 #include "ui/events/devices/x11/touch_factory_x11.h" |
28 #include "ui/events/platform/x11/x11_event_source_glib.h" | 29 #include "ui/events/platform/x11/x11_event_source_glib.h" |
29 #include "ui/events/test/platform_event_source_test_api.h" | 30 #include "ui/events/test/platform_event_source_test_api.h" |
30 #include "ui/gfx/geometry/point.h" | 31 #include "ui/gfx/geometry/point.h" |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 EXPECT_EQ(ui::ET_MOUSEWHEEL, second_recorder.mouse_events()[0].type()); | 642 EXPECT_EQ(ui::ET_MOUSEWHEEL, second_recorder.mouse_events()[0].type()); |
642 EXPECT_EQ(gfx::Point(-25, -25).ToString(), | 643 EXPECT_EQ(gfx::Point(-25, -25).ToString(), |
643 second_recorder.mouse_events()[0].location().ToString()); | 644 second_recorder.mouse_events()[0].location().ToString()); |
644 | 645 |
645 PretendCapture(nullptr); | 646 PretendCapture(nullptr); |
646 first.GetNativeWindow()->RemovePreTargetHandler(&first_recorder); | 647 first.GetNativeWindow()->RemovePreTargetHandler(&first_recorder); |
647 second.GetNativeWindow()->RemovePreTargetHandler(&second_recorder); | 648 second.GetNativeWindow()->RemovePreTargetHandler(&second_recorder); |
648 } | 649 } |
649 | 650 |
650 } // namespace views | 651 } // namespace views |
OLD | NEW |