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

Side by Side Diff: Tools/DumpRenderTree/chromium/EventSender.cpp

Issue 7054067: Merge 87848 - 2011-06-01 Daniel Cheng <dcheng@chromium.org> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 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
« no previous file with comments | « Tools/DumpRenderTree/chromium/EventSender.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // names to their methods will be done by calling bindToJavaScript() (define d 252 // names to their methods will be done by calling bindToJavaScript() (define d
253 // by CppBoundClass, the parent to EventSender). 253 // by CppBoundClass, the parent to EventSender).
254 bindMethod("addTouchPoint", &EventSender::addTouchPoint); 254 bindMethod("addTouchPoint", &EventSender::addTouchPoint);
255 bindMethod("beginDragWithFiles", &EventSender::beginDragWithFiles); 255 bindMethod("beginDragWithFiles", &EventSender::beginDragWithFiles);
256 bindMethod("cancelTouchPoint", &EventSender::cancelTouchPoint); 256 bindMethod("cancelTouchPoint", &EventSender::cancelTouchPoint);
257 bindMethod("clearKillRing", &EventSender::clearKillRing); 257 bindMethod("clearKillRing", &EventSender::clearKillRing);
258 bindMethod("clearTouchPoints", &EventSender::clearTouchPoints); 258 bindMethod("clearTouchPoints", &EventSender::clearTouchPoints);
259 bindMethod("contextClick", &EventSender::contextClick); 259 bindMethod("contextClick", &EventSender::contextClick);
260 bindMethod("continuousMouseScrollBy", &EventSender::continuousMouseScrollBy) ; 260 bindMethod("continuousMouseScrollBy", &EventSender::continuousMouseScrollBy) ;
261 bindMethod("dispatchMessage", &EventSender::dispatchMessage); 261 bindMethod("dispatchMessage", &EventSender::dispatchMessage);
262 bindMethod("dumpFilenameBeingDragged", &EventSender::dumpFilenameBeingDragge d);
262 bindMethod("enableDOMUIEventLogging", &EventSender::enableDOMUIEventLogging) ; 263 bindMethod("enableDOMUIEventLogging", &EventSender::enableDOMUIEventLogging) ;
263 bindMethod("fireKeyboardEventsToElement", &EventSender::fireKeyboardEventsTo Element); 264 bindMethod("fireKeyboardEventsToElement", &EventSender::fireKeyboardEventsTo Element);
264 bindMethod("keyDown", &EventSender::keyDown); 265 bindMethod("keyDown", &EventSender::keyDown);
265 bindMethod("leapForward", &EventSender::leapForward); 266 bindMethod("leapForward", &EventSender::leapForward);
266 bindMethod("mouseDown", &EventSender::mouseDown); 267 bindMethod("mouseDown", &EventSender::mouseDown);
267 bindMethod("mouseMoveTo", &EventSender::mouseMoveTo); 268 bindMethod("mouseMoveTo", &EventSender::mouseMoveTo);
268 bindMethod("mouseScrollBy", &EventSender::mouseScrollBy); 269 bindMethod("mouseScrollBy", &EventSender::mouseScrollBy);
269 bindMethod("mouseUp", &EventSender::mouseUp); 270 bindMethod("mouseUp", &EventSender::mouseUp);
270 bindMethod("releaseTouchPoint", &EventSender::releaseTouchPoint); 271 bindMethod("releaseTouchPoint", &EventSender::releaseTouchPoint);
271 bindMethod("scheduleAsynchronousClick", &EventSender::scheduleAsynchronousCl ick); 272 bindMethod("scheduleAsynchronousClick", &EventSender::scheduleAsynchronousCl ick);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 WebPoint clientPoint(event.x, event.y); 338 WebPoint clientPoint(event.x, event.y);
338 WebPoint screenPoint(event.globalX, event.globalY); 339 WebPoint screenPoint(event.globalX, event.globalY);
339 currentDragData = dragData; 340 currentDragData = dragData;
340 currentDragEffectsAllowed = mask; 341 currentDragEffectsAllowed = mask;
341 currentDragEffect = webview()->dragTargetDragEnter(dragData, clientPoint, sc reenPoint, currentDragEffectsAllowed); 342 currentDragEffect = webview()->dragTargetDragEnter(dragData, clientPoint, sc reenPoint, currentDragEffectsAllowed);
342 343
343 // Finish processing events. 344 // Finish processing events.
344 replaySavedEvents(); 345 replaySavedEvents();
345 } 346 }
346 347
348 void EventSender::dumpFilenameBeingDragged(const CppArgumentList&, CppVariant*)
349 {
350 printf("Filename being dragged: %s\n", currentDragData.fileContentFilename() .utf8().data());
351 }
352
347 WebMouseEvent::Button EventSender::getButtonTypeFromButtonNumber(int buttonCode) 353 WebMouseEvent::Button EventSender::getButtonTypeFromButtonNumber(int buttonCode)
348 { 354 {
349 if (!buttonCode) 355 if (!buttonCode)
350 return WebMouseEvent::ButtonLeft; 356 return WebMouseEvent::ButtonLeft;
351 if (buttonCode == 2) 357 if (buttonCode == 2)
352 return WebMouseEvent::ButtonRight; 358 return WebMouseEvent::ButtonRight;
353 return WebMouseEvent::ButtonMiddle; 359 return WebMouseEvent::ButtonMiddle;
354 } 360 }
355 361
356 int EventSender::getButtonNumberFromSingleArg(const CppArgumentList& arguments) 362 int EventSender::getButtonNumberFromSingleArg(const CppArgumentList& arguments)
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 1010
1005 void EventSender::fireKeyboardEventsToElement(const CppArgumentList&, CppVariant * result) 1011 void EventSender::fireKeyboardEventsToElement(const CppArgumentList&, CppVariant * result)
1006 { 1012 {
1007 result->setNull(); 1013 result->setNull();
1008 } 1014 }
1009 1015
1010 void EventSender::clearKillRing(const CppArgumentList&, CppVariant* result) 1016 void EventSender::clearKillRing(const CppArgumentList&, CppVariant* result)
1011 { 1017 {
1012 result->setNull(); 1018 result->setNull();
1013 } 1019 }
OLDNEW
« no previous file with comments | « Tools/DumpRenderTree/chromium/EventSender.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698