| 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 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 xevent.xbutton.type = ButtonRelease; | 176 xevent.xbutton.type = ButtonRelease; |
| 177 PostEventToWindowTreeHost(xevent, host_); | 177 PostEventToWindowTreeHost(xevent, host_); |
| 178 button_down_mask = (button_down_mask | xbutton->state) ^ xbutton->state; | 178 button_down_mask = (button_down_mask | xbutton->state) ^ xbutton->state; |
| 179 } | 179 } |
| 180 RunClosureAfterAllPendingUIEvents(closure); | 180 RunClosureAfterAllPendingUIEvents(closure); |
| 181 return true; | 181 return true; |
| 182 } | 182 } |
| 183 bool SendMouseClick(MouseButton type) override { | 183 bool SendMouseClick(MouseButton type) override { |
| 184 return SendMouseEvents(type, UP | DOWN); | 184 return SendMouseEvents(type, UP | DOWN); |
| 185 } | 185 } |
| 186 bool SendTouchEvents(int action, int num, int x, int y) override { |
| 187 NOTIMPLEMENTED(); |
| 188 return false; |
| 189 } |
| 190 bool SendTouchEventsNotifyWhenDone(int action, |
| 191 int num, |
| 192 int x, |
| 193 int y, |
| 194 const base::Closure& task) override { |
| 195 NOTIMPLEMENTED(); |
| 196 return false; |
| 197 } |
| 186 void RunClosureAfterAllPendingUIEvents( | 198 void RunClosureAfterAllPendingUIEvents( |
| 187 const base::Closure& closure) override { | 199 const base::Closure& closure) override { |
| 188 if (closure.is_null()) | 200 if (closure.is_null()) |
| 189 return; | 201 return; |
| 190 static XEvent* marker_event = NULL; | 202 static XEvent* marker_event = NULL; |
| 191 if (!marker_event) { | 203 if (!marker_event) { |
| 192 marker_event = new XEvent(); | 204 marker_event = new XEvent(); |
| 193 marker_event->xclient.type = ClientMessage; | 205 marker_event->xclient.type = ClientMessage; |
| 194 marker_event->xclient.display = NULL; | 206 marker_event->xclient.display = NULL; |
| 195 marker_event->xclient.window = None; | 207 marker_event->xclient.window = None; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 224 }; | 236 }; |
| 225 | 237 |
| 226 } // namespace | 238 } // namespace |
| 227 | 239 |
| 228 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { | 240 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { |
| 229 return new UIControlsX11(host); | 241 return new UIControlsX11(host); |
| 230 } | 242 } |
| 231 | 243 |
| 232 } // namespace test | 244 } // namespace test |
| 233 } // namespace aura | 245 } // namespace aura |
| OLD | NEW |