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

Side by Side Diff: ui/base/test/ui_controls_win.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
« no previous file with comments | « ui/base/test/ui_controls_internal_win.cc ('k') | ui/events/event.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/base/test/ui_controls.h" 5 #include "ui/base/test/ui_controls.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "ui/base/test/ui_controls_internal_win.h" 9 #include "ui/base/test/ui_controls_internal_win.h"
10 #include "ui/gfx/geometry/point.h" 10 #include "ui/gfx/geometry/point.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const base::Closure& task) { 59 const base::Closure& task) {
60 CHECK(g_ui_controls_enabled); 60 CHECK(g_ui_controls_enabled);
61 return internal::SendMouseEventsImpl(type, state, task); 61 return internal::SendMouseEventsImpl(type, state, task);
62 } 62 }
63 63
64 bool SendMouseClick(MouseButton type) { 64 bool SendMouseClick(MouseButton type) {
65 CHECK(g_ui_controls_enabled); 65 CHECK(g_ui_controls_enabled);
66 return internal::SendMouseEventsImpl(type, UP | DOWN, base::Closure()); 66 return internal::SendMouseEventsImpl(type, UP | DOWN, base::Closure());
67 } 67 }
68 68
69 bool SendTouchEvents(int action, int num, int x, int y) {
70 CHECK(g_ui_controls_enabled);
71 return internal::SendTouchEventsImpl(action, num, x, y);
72 }
73
69 void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) { 74 void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
70 // On windows, posting UI events is synchronous so just post the closure. 75 // On windows, posting UI events is synchronous so just post the closure.
71 base::MessageLoopForUI::current()->PostTask(FROM_HERE, closure); 76 base::MessageLoopForUI::current()->PostTask(FROM_HERE, closure);
72 } 77 }
73 78
74 } // namespace ui_controls 79 } // namespace ui_controls
OLDNEW
« no previous file with comments | « ui/base/test/ui_controls_internal_win.cc ('k') | ui/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698