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

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

Issue 710553002: aura: Remove WindowTreeHost::PostNativeEvent(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 1 month 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/ui_controls_factory_aurax11.cc ('k') | ui/aura/test/x11_event_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/ui_controls_factory_ozone.cc
diff --git a/ui/aura/test/ui_controls_factory_ozone.cc b/ui/aura/test/ui_controls_factory_ozone.cc
index 5bd96bb0ae6287228bd214ed794861bea6ac30a2..ff92cd6c6f866a99a2ff92ac47fe0edbd930deeb 100644
--- a/ui/aura/test/ui_controls_factory_ozone.cc
+++ b/ui/aura/test/ui_controls_factory_ozone.cc
@@ -10,6 +10,7 @@
#include "ui/aura/test/ui_controls_factory_aura.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/test/ui_controls_aura.h"
+#include "ui/events/test/events_test_utils.h"
namespace aura {
namespace test {
@@ -165,6 +166,14 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
}
private:
+ void SendEventToProcessor(ui::Event* event) {
+ ui::EventSourceTestApi event_source_test(host_->GetEventSource());
+ ui::EventDispatchDetails details =
+ event_source_test.SendEventToProcessor(event);
+ if (details.dispatcher_destroyed)
+ return;
+ }
+
void PostKeyEvent(ui::EventType type, ui::KeyboardCode key_code, int flags) {
base::MessageLoop::current()->PostTask(
FROM_HERE,
@@ -182,7 +191,7 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
flags |= ui::EF_FINAL;
ui::KeyEvent key_event(type, key_code, flags);
- host_->PostNativeEvent(&key_event);
+ SendEventToProcessor(&key_event);
}
void PostMouseEvent(ui::EventType type,
@@ -209,7 +218,7 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
// This hack is necessary to set the repeat count for clicks.
ui::MouseEvent mouse_event2(&mouse_event);
- host_->PostNativeEvent(&mouse_event2);
+ SendEventToProcessor(&mouse_event2);
}
WindowTreeHost* host_;
« no previous file with comments | « ui/aura/test/ui_controls_factory_aurax11.cc ('k') | ui/aura/test/x11_event_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698