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

Unified Diff: ui/views/test/ui_controls_factory_desktop_aurax11.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/window_tree_host_x11.cc ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/ui_controls_factory_desktop_aurax11.cc
diff --git a/ui/views/test/ui_controls_factory_desktop_aurax11.cc b/ui/views/test/ui_controls_factory_desktop_aurax11.cc
index 1c5fe850fde06d66695af16416835b68502968b3..7e52286ad4670d24828736c8c26e11173df71953 100644
--- a/ui/views/test/ui_controls_factory_desktop_aurax11.cc
+++ b/ui/views/test/ui_controls_factory_desktop_aurax11.cc
@@ -16,6 +16,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_event_dispatcher.h"
#include "ui/base/test/ui_controls_aura.h"
#include "ui/base/x/x11_util.h"
@@ -104,11 +105,11 @@ class UIControlsDesktopX11 : public UIControlsAura {
xevent.xkey.keycode =
XKeysymToKeycode(x_display_,
ui::XKeysymForWindowsKeyCode(key, shift));
- host->PostNativeEvent(&xevent);
+ aura::test::PostEventToWindowTreeHost(xevent, host);
// Send key release events.
xevent.xkey.type = KeyRelease;
- host->PostNativeEvent(&xevent);
+ aura::test::PostEventToWindowTreeHost(xevent, host);
if (alt)
UnmaskAndSetKeycodeThenSend(host, &xevent, Mod1Mask, XK_Alt_L);
if (shift)
@@ -156,7 +157,7 @@ class UIControlsDesktopX11 : public UIControlsAura {
xmotion->state = button_down_mask;
xmotion->same_screen = True;
// RootWindow will take care of other necessary fields.
- host->PostNativeEvent(&xevent);
+ aura::test::PostEventToWindowTreeHost(xevent, host);
}
RunClosureAfterAllPendingUIEvents(closure);
return true;
@@ -195,12 +196,12 @@ class UIControlsDesktopX11 : public UIControlsAura {
// RootWindow will take care of other necessary fields.
if (state & DOWN) {
xevent.xbutton.type = ButtonPress;
- root_window->GetHost()->PostNativeEvent(&xevent);
+ aura::test::PostEventToWindowTreeHost(xevent, root_window->GetHost());
button_down_mask |= xbutton->state;
}
if (state & UP) {
xevent.xbutton.type = ButtonRelease;
- root_window->GetHost()->PostNativeEvent(&xevent);
+ aura::test::PostEventToWindowTreeHost(xevent, root_window->GetHost());
button_down_mask = (button_down_mask | xbutton->state) ^ xbutton->state;
}
RunClosureAfterAllPendingUIEvents(closure);
@@ -251,7 +252,7 @@ class UIControlsDesktopX11 : public UIControlsAura {
KeySym keysym,
unsigned int mask) {
xevent->xkey.keycode = XKeysymToKeycode(x_display_, keysym);
- host->PostNativeEvent(xevent);
+ aura::test::PostEventToWindowTreeHost(*xevent, host);
xevent->xkey.state |= mask;
}
@@ -261,7 +262,7 @@ class UIControlsDesktopX11 : public UIControlsAura {
KeySym keysym) {
xevent->xkey.state ^= mask;
xevent->xkey.keycode = XKeysymToKeycode(x_display_, keysym);
- host->PostNativeEvent(xevent);
+ aura::test::PostEventToWindowTreeHost(*xevent, host);
}
// Our X11 state.
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698