blob: 828896e554fb2585ee818a400d86a99c189c502e [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/ws/test_host_event_dispatcher.h"
#include "ui/aura/window_tree_host.h"
#include "ui/events/event_sink.h"
#include "ui/events/test/events_test_utils.h"
namespace ws {
TestHostEventDispatcher::TestHostEventDispatcher(
aura::WindowTreeHost* window_tree_host)
: window_tree_host_(window_tree_host) {
DCHECK(window_tree_host_);
}
TestHostEventDispatcher::~TestHostEventDispatcher() = default;
ui::EventDispatchDetails TestHostEventDispatcher::DispatchEventFromQueue(
ui::Event* event) {
return ui::EventSourceTestApi(window_tree_host_).SendEventToSink(event);
}
} // namespace ws