| Index: ui/aura/test/ui_controls_factory_aurax11.cc
|
| diff --git a/ui/aura/test/ui_controls_factory_aurax11.cc b/ui/aura/test/ui_controls_factory_aurax11.cc
|
| index b89e86c763363304f90f11acb663db55315f7b84..8999aa6b1b10af7deed6099aa11f7cea0a3a3699 100644
|
| --- a/ui/aura/test/ui_controls_factory_aurax11.cc
|
| +++ b/ui/aura/test/ui_controls_factory_aurax11.cc
|
| @@ -11,6 +11,7 @@
|
| #include "ui/aura/env.h"
|
| #include "ui/aura/test/aura_test_utils.h"
|
| #include "ui/aura/test/ui_controls_factory_aura.h"
|
| +#include "ui/aura/test/x11_event_sender.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/aura/window_tree_host.h"
|
| #include "ui/base/test/ui_controls_aura.h"
|
| @@ -79,11 +80,11 @@ class UIControlsX11 : public UIControlsAura {
|
| xevent.xkey.keycode =
|
| XKeysymToKeycode(gfx::GetXDisplay(),
|
| ui::XKeysymForWindowsKeyCode(key, shift));
|
| - host_->PostNativeEvent(&xevent);
|
| + PostEventToWindowTreeHost(xevent, host_);
|
|
|
| // Send key release events.
|
| xevent.xkey.type = KeyRelease;
|
| - host_->PostNativeEvent(&xevent);
|
| + PostEventToWindowTreeHost(xevent, host_);
|
| if (alt)
|
| UnmaskAndSetKeycodeThenSend(&xevent, Mod1Mask, XK_Alt_L);
|
| if (shift)
|
| @@ -127,7 +128,7 @@ class UIControlsX11 : public UIControlsAura {
|
| xmotion->state = button_down_mask;
|
| xmotion->same_screen = True;
|
| // WindowTreeHost will take care of other necessary fields.
|
| - host_->PostNativeEvent(&xevent);
|
| + PostEventToWindowTreeHost(xevent, host_);
|
| }
|
| RunClosureAfterAllPendingUIEvents(closure);
|
| return true;
|
| @@ -167,12 +168,12 @@ class UIControlsX11 : public UIControlsAura {
|
| // WindowEventDispatcher will take care of other necessary fields.
|
| if (state & DOWN) {
|
| xevent.xbutton.type = ButtonPress;
|
| - host_->PostNativeEvent(&xevent);
|
| + PostEventToWindowTreeHost(xevent, host_);
|
| button_down_mask |= xbutton->state;
|
| }
|
| if (state & UP) {
|
| xevent.xbutton.type = ButtonRelease;
|
| - host_->PostNativeEvent(&xevent);
|
| + PostEventToWindowTreeHost(xevent, host_);
|
| button_down_mask = (button_down_mask | xbutton->state) ^ xbutton->state;
|
| }
|
| RunClosureAfterAllPendingUIEvents(closure);
|
| @@ -194,7 +195,7 @@ class UIControlsX11 : public UIControlsAura {
|
| marker_event->xclient.format = 8;
|
| }
|
| marker_event->xclient.message_type = MarkerEventAtom();
|
| - host_->PostNativeEvent(marker_event);
|
| + PostEventToWindowTreeHost(*marker_event, host_);
|
| ui::PlatformEventWaiter::Create(closure, base::Bind(&Matcher));
|
| }
|
| private:
|
| @@ -203,7 +204,7 @@ class UIControlsX11 : public UIControlsAura {
|
| unsigned int mask) {
|
| xevent->xkey.keycode =
|
| XKeysymToKeycode(gfx::GetXDisplay(), keysym);
|
| - host_->PostNativeEvent(xevent);
|
| + PostEventToWindowTreeHost(*xevent, host_);
|
| xevent->xkey.state |= mask;
|
| }
|
|
|
| @@ -213,7 +214,7 @@ class UIControlsX11 : public UIControlsAura {
|
| xevent->xkey.state ^= mask;
|
| xevent->xkey.keycode =
|
| XKeysymToKeycode(gfx::GetXDisplay(), keysym);
|
| - host_->PostNativeEvent(xevent);
|
| + PostEventToWindowTreeHost(*xevent, host_);
|
| }
|
|
|
| WindowTreeHost* host_;
|
|
|