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

Side by Side Diff: ui/aura/test/event_generator.cc

Issue 143023003: Fully support the autohide shelf option for touch UI on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/test/event_generator.h ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/aura/test/event_generator.h" 5 #include "ui/aura/test/event_generator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "ui/aura/client/screen_position_client.h" 10 #include "ui/aura/client/screen_position_client.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 void EventGenerator::PressMoveAndReleaseTouchTo(const gfx::Point& point) { 241 void EventGenerator::PressMoveAndReleaseTouchTo(const gfx::Point& point) {
242 PressTouch(); 242 PressTouch();
243 MoveTouch(point); 243 MoveTouch(point);
244 ReleaseTouch(); 244 ReleaseTouch();
245 } 245 }
246 246
247 void EventGenerator::PressMoveAndReleaseTouchToCenterOf(Window* window) { 247 void EventGenerator::PressMoveAndReleaseTouchToCenterOf(Window* window) {
248 PressMoveAndReleaseTouchTo(CenterOfWindow(window)); 248 PressMoveAndReleaseTouchTo(CenterOfWindow(window));
249 } 249 }
250 250
251 void EventGenerator::GestureEdgeSwipe() {
252 ui::GestureEvent gesture(
253 ui::ET_GESTURE_WIN8_EDGE_SWIPE,
254 0,
255 0,
256 0,
257 ui::EventTimeForNow(),
258 ui::GestureEventDetails(ui::ET_GESTURE_WIN8_EDGE_SWIPE, 0, 0),
259 0);
260 Dispatch(&gesture);
261 }
262
251 void EventGenerator::GestureTapAt(const gfx::Point& location) { 263 void EventGenerator::GestureTapAt(const gfx::Point& location) {
252 const int kTouchId = 2; 264 const int kTouchId = 2;
253 ui::TouchEvent press(ui::ET_TOUCH_PRESSED, 265 ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
254 location, 266 location,
255 kTouchId, 267 kTouchId,
256 ui::EventTimeForNow()); 268 ui::EventTimeForNow());
257 Dispatch(&press); 269 Dispatch(&press);
258 270
259 ui::TouchEvent release( 271 ui::TouchEvent release(
260 ui::ET_TOUCH_RELEASED, location, kTouchId, 272 ui::ET_TOUCH_RELEASED, location, kTouchId,
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 base::MessageLoopProxy::current()->PostTask( 623 base::MessageLoopProxy::current()->PostTask(
612 FROM_HERE, 624 FROM_HERE,
613 base::Bind(&EventGenerator::DispatchNextPendingEvent, 625 base::Bind(&EventGenerator::DispatchNextPendingEvent,
614 base::Unretained(this))); 626 base::Unretained(this)));
615 } 627 }
616 } 628 }
617 629
618 630
619 } // namespace test 631 } // namespace test
620 } // namespace aura 632 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/event_generator.h ('k') | ui/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698