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

Side by Side Diff: components/test_runner/event_sender.cc

Issue 1218663006: Use new WebTouchPoint field names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | content/browser/renderer_host/input/input_router_impl_perftest.cc » ('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 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 "components/test_runner/event_sender.h" 5 #include "components/test_runner/event_sender.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after
1750 } 1750 }
1751 1751
1752 double radius_y = radius_x; 1752 double radius_y = radius_x;
1753 if (!args->PeekNext().IsEmpty()) { 1753 if (!args->PeekNext().IsEmpty()) {
1754 if (!args->GetNext(&radius_y)) { 1754 if (!args->GetNext(&radius_y)) {
1755 args->ThrowError(); 1755 args->ThrowError();
1756 return; 1756 return;
1757 } 1757 }
1758 } 1758 }
1759 1759
1760 touch_point.radiusX = static_cast<float>(radius_x); 1760 touch_point.width = static_cast<float>(radius_x);
1761 touch_point.radiusY = static_cast<float>(radius_y); 1761 touch_point.height = static_cast<float>(radius_y);
1762 } 1762 }
1763 1763
1764 int lowest_id = 0; 1764 int lowest_id = 0;
1765 for (size_t i = 0; i < touch_points_.size(); i++) { 1765 for (size_t i = 0; i < touch_points_.size(); i++) {
1766 if (touch_points_[i].id == lowest_id) 1766 if (touch_points_[i].pointerId == lowest_id)
1767 lowest_id++; 1767 lowest_id++;
1768 } 1768 }
1769 touch_point.id = lowest_id; 1769 touch_point.pointerId = lowest_id;
1770 touch_points_.push_back(touch_point); 1770 touch_points_.push_back(touch_point);
1771 } 1771 }
1772 1772
1773 void EventSender::MouseDragBegin() { 1773 void EventSender::MouseDragBegin() {
1774 WebMouseWheelEvent event; 1774 WebMouseWheelEvent event;
1775 InitMouseEvent(WebInputEvent::MouseWheel, 1775 InitMouseEvent(WebInputEvent::MouseWheel,
1776 WebMouseEvent::ButtonNone, 1776 WebMouseEvent::ButtonNone,
1777 last_mouse_pos_, 1777 last_mouse_pos_,
1778 GetCurrentEventTimeSec(), 1778 GetCurrentEventTimeSec(),
1779 click_count_, 1779 click_count_,
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 2481
2482 bool EventSender::HandleInputEventOnViewOrPopup(const WebInputEvent& event) { 2482 bool EventSender::HandleInputEventOnViewOrPopup(const WebInputEvent& event) {
2483 if (WebPagePopup* popup = view_->pagePopup()) { 2483 if (WebPagePopup* popup = view_->pagePopup()) {
2484 if (!WebInputEvent::isKeyboardEventType(event.type)) 2484 if (!WebInputEvent::isKeyboardEventType(event.type))
2485 return popup->handleInputEvent(event); 2485 return popup->handleInputEvent(event);
2486 } 2486 }
2487 return view_->handleInputEvent(event); 2487 return view_->handleInputEvent(event);
2488 } 2488 }
2489 2489
2490 } // namespace test_runner 2490 } // namespace test_runner
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_impl_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698