| Index: chrome/browser/automation/ui_controls_aurax11.cc
|
| ===================================================================
|
| --- chrome/browser/automation/ui_controls_aurax11.cc (revision 113260)
|
| +++ chrome/browser/automation/ui_controls_aurax11.cc (working copy)
|
| @@ -7,11 +7,16 @@
|
| #include <X11/keysym.h>
|
| #include <X11/Xlib.h>
|
|
|
| +// X macro fail.
|
| +#if defined(RootWindow)
|
| +#undef RootWindow
|
| +#endif
|
| +
|
| #include "base/callback.h"
|
| #include "base/logging.h"
|
| #include "base/message_pump_x.h"
|
| #include "chrome/browser/automation/ui_controls_internal.h"
|
| -#include "ui/aura/desktop.h"
|
| +#include "ui/aura/root_window.h"
|
| #include "ui/base/keycodes/keyboard_code_conversion_x.h"
|
| #include "ui/views/view.h"
|
|
|
| @@ -90,14 +95,14 @@
|
| unsigned int keycode) {
|
| xevent->xkey.state |= mask;
|
| xevent->xkey.keycode = keycode;
|
| - aura::Desktop::GetInstance()->PostNativeEvent(xevent);
|
| + aura::RootWindow::GetInstance()->PostNativeEvent(xevent);
|
| }
|
|
|
| void SetKeycodeAndSendThenUnmask(XEvent* xevent,
|
| unsigned int mask,
|
| unsigned int keycode) {
|
| xevent->xkey.keycode = keycode;
|
| - aura::Desktop::GetInstance()->PostNativeEvent(xevent);
|
| + aura::RootWindow::GetInstance()->PostNativeEvent(xevent);
|
| xevent->xkey.state ^= mask;
|
| }
|
|
|
| @@ -118,11 +123,11 @@
|
| if (alt)
|
| SetMaskAndKeycodeThenSend(&xevent, Mod1Mask, XK_Alt_L);
|
| xevent.xkey.keycode = ui::XKeysymForWindowsKeyCode(key, shift);
|
| - aura::Desktop::GetInstance()->PostNativeEvent(&xevent);
|
| + aura::RootWindow::GetInstance()->PostNativeEvent(&xevent);
|
|
|
| // Send key release events.
|
| xevent.xkey.type = KeyRelease;
|
| - aura::Desktop::GetInstance()->PostNativeEvent(&xevent);
|
| + aura::RootWindow::GetInstance()->PostNativeEvent(&xevent);
|
| if (alt)
|
| SetKeycodeAndSendThenUnmask(&xevent, Mod1Mask, XK_Alt_L);
|
| if (shift)
|
| @@ -145,8 +150,8 @@
|
| g_current_x = xmotion->x = x;
|
| g_current_y = xmotion->y = y;
|
| xmotion->same_screen = True;
|
| - // Desktop will take care of other necessary fields.
|
| - aura::Desktop::GetInstance()->PostNativeEvent(&xevent);
|
| + // RootWindow will take care of other necessary fields.
|
| + aura::RootWindow::GetInstance()->PostNativeEvent(&xevent);
|
| RunClosureAfterAllPendingUIEvents(closure);
|
| return false;
|
| }
|
| @@ -179,16 +184,16 @@
|
| xbutton->state = Button3Mask;
|
| break;
|
| }
|
| - // Desktop will take care of other necessary fields.
|
| + // RootWindow will take care of other necessary fields.
|
|
|
| - aura::Desktop* desktop = aura::Desktop::GetInstance();
|
| + aura::RootWindow* root_window = aura::RootWindow::GetInstance();
|
| if (state & DOWN) {
|
| xevent.xbutton.type = ButtonPress;
|
| - desktop->PostNativeEvent(&xevent);
|
| + root_window->PostNativeEvent(&xevent);
|
| }
|
| if (state & UP) {
|
| xevent.xbutton.type = ButtonRelease;
|
| - desktop->PostNativeEvent(&xevent);
|
| + root_window->PostNativeEvent(&xevent);
|
| }
|
| RunClosureAfterAllPendingUIEvents(closure);
|
| return false;
|
| @@ -220,7 +225,7 @@
|
| marker_event->xclient.format = 8;
|
| }
|
| marker_event->xclient.message_type = MarkerEventAtom();
|
| - aura::Desktop::GetInstance()->PostNativeEvent(marker_event);
|
| + aura::RootWindow::GetInstance()->PostNativeEvent(marker_event);
|
| new EventWaiter(closure, &Matcher);
|
| }
|
|
|
|
|