OLD | NEW |
| (Empty) |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_AURA_TEST_TEST_WINDOW_TARGETER_H_ | |
6 #define UI_AURA_TEST_TEST_WINDOW_TARGETER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "ui/aura/window_targeter.h" | |
10 #include "ui/events/event_targeter.h" | |
11 | |
12 namespace aura { | |
13 namespace test { | |
14 | |
15 // A test WindowTargeter implementation that would always return the | |
16 // EventTarget it received from FindTargetForEvent or FindNextBestTarget | |
17 // as the EventTarget that should receive the event. | |
18 class TestWindowTargeter : public WindowTargeter { | |
19 public: | |
20 TestWindowTargeter(); | |
21 ~TestWindowTargeter() override; | |
22 | |
23 protected: | |
24 // WindowTargeter: | |
25 ui::EventTarget* FindTargetForEvent(ui::EventTarget* root, | |
26 ui::Event* event) override; | |
27 ui::EventTarget* FindNextBestTarget(ui::EventTarget* previous_target, | |
28 ui::Event* event) override; | |
29 | |
30 private: | |
31 DISALLOW_COPY_AND_ASSIGN(TestWindowTargeter); | |
32 }; | |
33 | |
34 } // namespace test | |
35 } // namespace aura | |
36 | |
37 #endif // UI_AURA_TEST_TEST_WINDOW_TARGETER_H_ | |
OLD | NEW |