| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <X11/keysym.h> | 5 #include <X11/keysym.h> |
| 6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
| 7 | 7 |
| 8 // X macro fail. | 8 // X macro fail. |
| 9 #if defined(RootWindow) | 9 #if defined(RootWindow) |
| 10 #undef RootWindow | 10 #undef RootWindow |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 xevent.xbutton.type = ButtonRelease; | 209 xevent.xbutton.type = ButtonRelease; |
| 210 aura::test::PostEventToWindowTreeHost(xevent, root_window->GetHost()); | 210 aura::test::PostEventToWindowTreeHost(xevent, root_window->GetHost()); |
| 211 button_down_mask = (button_down_mask | xbutton->state) ^ xbutton->state; | 211 button_down_mask = (button_down_mask | xbutton->state) ^ xbutton->state; |
| 212 } | 212 } |
| 213 RunClosureAfterAllPendingUIEvents(closure); | 213 RunClosureAfterAllPendingUIEvents(closure); |
| 214 return true; | 214 return true; |
| 215 } | 215 } |
| 216 bool SendMouseClick(MouseButton type) override { | 216 bool SendMouseClick(MouseButton type) override { |
| 217 return SendMouseEvents(type, UP | DOWN); | 217 return SendMouseEvents(type, UP | DOWN); |
| 218 } | 218 } |
| 219 bool SendTouchEvents(int action, int num, long x, long y) override { |
| 220 NOTIMPLEMENTED(); |
| 221 return false; |
| 222 } |
| 219 void RunClosureAfterAllPendingUIEvents( | 223 void RunClosureAfterAllPendingUIEvents( |
| 220 const base::Closure& closure) override { | 224 const base::Closure& closure) override { |
| 221 if (closure.is_null()) | 225 if (closure.is_null()) |
| 222 return; | 226 return; |
| 223 static XEvent* marker_event = NULL; | 227 static XEvent* marker_event = NULL; |
| 224 if (!marker_event) { | 228 if (!marker_event) { |
| 225 marker_event = new XEvent(); | 229 marker_event = new XEvent(); |
| 226 marker_event->xclient.type = ClientMessage; | 230 marker_event->xclient.type = ClientMessage; |
| 227 marker_event->xclient.display = x_display_; | 231 marker_event->xclient.display = x_display_; |
| 228 marker_event->xclient.window = x_window_; | 232 marker_event->xclient.window = x_window_; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 289 |
| 286 UIControlsAura* CreateUIControlsDesktopAura() { | 290 UIControlsAura* CreateUIControlsDesktopAura() { |
| 287 // The constructor of UIControlsDesktopX11 needs X11 connection to be | 291 // The constructor of UIControlsDesktopX11 needs X11 connection to be |
| 288 // initialized. | 292 // initialized. |
| 289 gfx::InitializeThreadedX11(); | 293 gfx::InitializeThreadedX11(); |
| 290 return new UIControlsDesktopX11(); | 294 return new UIControlsDesktopX11(); |
| 291 } | 295 } |
| 292 | 296 |
| 293 } // namespace test | 297 } // namespace test |
| 294 } // namespace views | 298 } // namespace views |
| OLD | NEW |