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

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, 6 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, int x, int y) override {
220 NOTIMPLEMENTED();
221 return false;
222 }
223 bool SendTouchEventsNotifyWhenDone(int action,
224 int num,
225 int x,
226 int y,
227 const base::Closure& task) override {
228 NOTIMPLEMENTED();
229 return false;
230 }
219 void RunClosureAfterAllPendingUIEvents( 231 void RunClosureAfterAllPendingUIEvents(
220 const base::Closure& closure) override { 232 const base::Closure& closure) override {
221 if (closure.is_null()) 233 if (closure.is_null())
222 return; 234 return;
223 static XEvent* marker_event = NULL; 235 static XEvent* marker_event = NULL;
224 if (!marker_event) { 236 if (!marker_event) {
225 marker_event = new XEvent(); 237 marker_event = new XEvent();
226 marker_event->xclient.type = ClientMessage; 238 marker_event->xclient.type = ClientMessage;
227 marker_event->xclient.display = x_display_; 239 marker_event->xclient.display = x_display_;
228 marker_event->xclient.window = x_window_; 240 marker_event->xclient.window = x_window_;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 297
286 UIControlsAura* CreateUIControlsDesktopAura() { 298 UIControlsAura* CreateUIControlsDesktopAura() {
287 // The constructor of UIControlsDesktopX11 needs X11 connection to be 299 // The constructor of UIControlsDesktopX11 needs X11 connection to be
288 // initialized. 300 // initialized.
289 gfx::InitializeThreadedX11(); 301 gfx::InitializeThreadedX11();
290 return new UIControlsDesktopX11(); 302 return new UIControlsDesktopX11();
291 } 303 }
292 304
293 } // namespace test 305 } // namespace test
294 } // namespace views 306 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698