Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(601)

Unified Diff: ui/aura/test/event_generator.cc

Issue 147203004: aura: Remove event-dispatch methods from WindowTreeHostDelegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/window_targeter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/event_generator.cc
diff --git a/ui/aura/test/event_generator.cc b/ui/aura/test/event_generator.cc
index b62d3a892eff8698cadc5a96b944a85a05cff807..b5f140c9501ef3a4810c3543d499f89ba6098ef1 100644
--- a/ui/aura/test/event_generator.cc
+++ b/ui/aura/test/event_generator.cc
@@ -587,23 +587,9 @@ void EventGenerator::DoDispatchEvent(ui::Event* event, bool async) {
}
pending_events_.push_back(pending_event);
} else {
- WindowTreeHostDelegate* root_window_host_delegate =
- current_root_window_->AsWindowTreeHostDelegate();
- if (event->IsKeyEvent()) {
- root_window_host_delegate->OnHostKeyEvent(
- static_cast<ui::KeyEvent*>(event));
- } else if (event->IsMouseEvent()) {
- root_window_host_delegate->OnHostMouseEvent(
- static_cast<ui::MouseEvent*>(event));
- } else if (event->IsTouchEvent()) {
- root_window_host_delegate->OnHostTouchEvent(
- static_cast<ui::TouchEvent*>(event));
- } else if (event->IsScrollEvent()) {
- root_window_host_delegate->OnHostScrollEvent(
- static_cast<ui::ScrollEvent*>(event));
- } else {
- NOTREACHED() << "Invalid event type";
- }
+ ui::EventDispatchDetails details = current_root_window_->OnEventFromSource(
+ static_cast<ui::KeyEvent*>(event));
+ CHECK(!details.dispatcher_destroyed);
}
}
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/window_targeter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698