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

Side by Side Diff: ui/aura/test/ui_controls_factory_ozone.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/bind.h" 5 #include "base/bind.h"
6 #include "base/location.h" 6 #include "base/location.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 PostMouseEvent(ui::ET_MOUSE_RELEASED, host_location, 166 PostMouseEvent(ui::ET_MOUSE_RELEASED, host_location,
167 button_down_mask_ | flag, flag); 167 button_down_mask_ | flag, flag);
168 } 168 }
169 169
170 RunClosureAfterAllPendingUIEvents(closure); 170 RunClosureAfterAllPendingUIEvents(closure);
171 return true; 171 return true;
172 } 172 }
173 bool SendMouseClick(ui_controls::MouseButton type) override { 173 bool SendMouseClick(ui_controls::MouseButton type) override {
174 return SendMouseEvents(type, ui_controls::UP | ui_controls::DOWN); 174 return SendMouseEvents(type, ui_controls::UP | ui_controls::DOWN);
175 } 175 }
176 bool SendTouchEventsNotifyWhenDone(int action,
177 int num,
178 int x,
179 int y,
180 const base::Closure& task) override {
181 NOTIMPLEMENTED();
182 return false;
183 }
176 void RunClosureAfterAllPendingUIEvents( 184 void RunClosureAfterAllPendingUIEvents(
177 const base::Closure& closure) override { 185 const base::Closure& closure) override {
178 if (!closure.is_null()) 186 if (!closure.is_null())
179 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure); 187 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure);
180 } 188 }
181 189
182 private: 190 private:
183 void SendEventToSink(ui::Event* event) { 191 void SendEventToSink(ui::Event* event) {
184 ui::EventSourceTestApi event_source_test(host_->GetEventSource()); 192 ui::EventSourceTestApi event_source_test(host_->GetEventSource());
185 ui::EventDispatchDetails details = event_source_test.SendEventToSink(event); 193 ui::EventDispatchDetails details = event_source_test.SendEventToSink(event);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 }; 244 };
237 245
238 } // namespace 246 } // namespace
239 247
240 ui_controls::UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { 248 ui_controls::UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) {
241 return new UIControlsOzone(host); 249 return new UIControlsOzone(host);
242 } 250 }
243 251
244 } // namespace test 252 } // namespace test
245 } // namespace aura 253 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698