| Index: ui/aura/test/event_generator_delegate_aura.cc
|
| diff --git a/ui/aura/test/event_generator_delegate_aura.cc b/ui/aura/test/event_generator_delegate_aura.cc
|
| index 59d3de3bc5432f38ca00f795d38ebf39e2afba04..25a7e141061b8c3c497d11909b51d124f1bca78f 100644
|
| --- a/ui/aura/test/event_generator_delegate_aura.cc
|
| +++ b/ui/aura/test/event_generator_delegate_aura.cc
|
| @@ -7,6 +7,9 @@
|
| #include "base/macros.h"
|
| #include "base/memory/singleton.h"
|
| #include "ui/aura/client/screen_position_client.h"
|
| +#include "ui/aura/env.h"
|
| +#include "ui/aura/test/env_test_helper.h"
|
| +#include "ui/aura/test/mus/window_tree_client_private.h"
|
| #include "ui/aura/window_event_dispatcher.h"
|
| #include "ui/aura/window_tree_host.h"
|
| #include "ui/base/ime/input_method.h"
|
| @@ -136,5 +139,21 @@ void EventGeneratorDelegateAura::DispatchKeyEventToIME(ui::EventTarget* target,
|
| window->GetHost()->GetInputMethod()->DispatchKeyEvent(event);
|
| }
|
|
|
| +void EventGeneratorDelegateAura::DispatchEventToPointerWatchers(
|
| + ui::EventTarget* target,
|
| + const ui::PointerEvent& event) {
|
| + // In non-mus aura PointerWatchers are handled by system-wide EventHandlers,
|
| + // for example ash::Shell and ash::PointerWatcherAdapter.
|
| + if (!Env::GetInstance()->HasWindowTreeClient())
|
| + return;
|
| +
|
| + // Route the event through WindowTreeClient as in production mus. Does nothing
|
| + // if there are no PointerWatchers installed.
|
| + Window* window = static_cast<Window*>(target);
|
| + WindowTreeClient* window_tree_client = EnvTestHelper().GetWindowTreeClient();
|
| + WindowTreeClientPrivate(window_tree_client)
|
| + .CallOnPointerEventObserved(window, ui::Event::Clone(event));
|
| +}
|
| +
|
| } // namespace test
|
| } // namespace aura
|
|
|