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

Side by Side Diff: ui/aura/test/ui_controls_factory_aurawin.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 | « chrome/test/BUILD.gn ('k') | ui/base/test/ui_controls.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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "ui/aura/test/ui_controls_factory_aura.h" 10 #include "ui/aura/test/ui_controls_factory_aura.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return SendMouseEventsImpl(type, state, base::Closure()); 68 return SendMouseEventsImpl(type, state, base::Closure());
69 } 69 }
70 bool SendMouseEventsNotifyWhenDone(MouseButton type, 70 bool SendMouseEventsNotifyWhenDone(MouseButton type,
71 int state, 71 int state,
72 const base::Closure& task) override { 72 const base::Closure& task) override {
73 return SendMouseEventsImpl(type, state, task); 73 return SendMouseEventsImpl(type, state, task);
74 } 74 }
75 bool SendMouseClick(MouseButton type) override { 75 bool SendMouseClick(MouseButton type) override {
76 return SendMouseEvents(type, UP | DOWN); 76 return SendMouseEvents(type, UP | DOWN);
77 } 77 }
78 bool SendTouchEvents(int action, int num, int x, int y) override {
79 return SendTouchEventsImpl(action, num, x, y);
80 }
78 void RunClosureAfterAllPendingUIEvents( 81 void RunClosureAfterAllPendingUIEvents(
79 const base::Closure& closure) override { 82 const base::Closure& closure) override {
80 // On windows, posting UI events is synchronous so just post the closure. 83 // On windows, posting UI events is synchronous so just post the closure.
81 DCHECK(base::MessageLoopForUI::IsCurrent()); 84 DCHECK(base::MessageLoopForUI::IsCurrent());
82 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure); 85 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure);
83 } 86 }
84 87
85 private: 88 private:
86 DISALLOW_COPY_AND_ASSIGN(UIControlsWin); 89 DISALLOW_COPY_AND_ASSIGN(UIControlsWin);
87 }; 90 };
88 91
89 } // namespace 92 } // namespace
90 93
91 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { 94 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) {
92 return new UIControlsWin(); 95 return new UIControlsWin();
93 } 96 }
94 97
95 } // namespace test 98 } // namespace test
96 } // namespace aura 99 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | ui/base/test/ui_controls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698