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

Side by Side Diff: ui/views/test/ui_controls_factory_desktop_aurax11.cc

Issue 2904113002: Replacing WM_TOUCH with WM_POINTER for touch events on Wins 8+ (Closed)
Patch Set: wm touch Created 3 years, 5 months 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 unified diff | Download patch
OLDNEW
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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 xevent.xbutton.type = ButtonRelease; 210 xevent.xbutton.type = ButtonRelease;
211 aura::test::PostEventToWindowTreeHost(xevent, root_window->GetHost()); 211 aura::test::PostEventToWindowTreeHost(xevent, root_window->GetHost());
212 button_down_mask = (button_down_mask | xbutton->state) ^ xbutton->state; 212 button_down_mask = (button_down_mask | xbutton->state) ^ xbutton->state;
213 } 213 }
214 RunClosureAfterAllPendingUIEvents(closure); 214 RunClosureAfterAllPendingUIEvents(closure);
215 return true; 215 return true;
216 } 216 }
217 bool SendMouseClick(MouseButton type) override { 217 bool SendMouseClick(MouseButton type) override {
218 return SendMouseEvents(type, UP | DOWN); 218 return SendMouseEvents(type, UP | DOWN);
219 } 219 }
220 bool SendTouchEvents(int action, int num, int x, int y) override {
221 NOTIMPLEMENTED();
222 return false;
223 }
220 void RunClosureAfterAllPendingUIEvents( 224 void RunClosureAfterAllPendingUIEvents(
221 const base::Closure& closure) override { 225 const base::Closure& closure) override {
222 if (closure.is_null()) 226 if (closure.is_null())
223 return; 227 return;
224 static XEvent* marker_event = NULL; 228 static XEvent* marker_event = NULL;
225 if (!marker_event) { 229 if (!marker_event) {
226 marker_event = new XEvent(); 230 marker_event = new XEvent();
227 marker_event->xclient.type = ClientMessage; 231 marker_event->xclient.type = ClientMessage;
228 marker_event->xclient.display = x_display_; 232 marker_event->xclient.display = x_display_;
229 marker_event->xclient.window = x_window_; 233 marker_event->xclient.window = x_window_;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 290
287 UIControlsAura* CreateUIControlsDesktopAura() { 291 UIControlsAura* CreateUIControlsDesktopAura() {
288 // The constructor of UIControlsDesktopX11 needs X11 connection to be 292 // The constructor of UIControlsDesktopX11 needs X11 connection to be
289 // initialized. 293 // initialized.
290 gfx::InitializeThreadedX11(); 294 gfx::InitializeThreadedX11();
291 return new UIControlsDesktopX11(); 295 return new UIControlsDesktopX11();
292 } 296 }
293 297
294 } // namespace test 298 } // namespace test
295 } // namespace views 299 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698