Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2232 time_offset_ms_ / 1000.0; | 2232 time_offset_ms_ / 1000.0; |
| 2233 } | 2233 } |
| 2234 | 2234 |
| 2235 void EventSender::DoLeapForward(int milliseconds) { | 2235 void EventSender::DoLeapForward(int milliseconds) { |
| 2236 time_offset_ms_ += milliseconds; | 2236 time_offset_ms_ += milliseconds; |
| 2237 } | 2237 } |
| 2238 | 2238 |
| 2239 void EventSender::GetOptionalTouchArgs(gin::Arguments* args, | 2239 void EventSender::GetOptionalTouchArgs(gin::Arguments* args, |
| 2240 bool& moved_beyond_slop_region, | 2240 bool& moved_beyond_slop_region, |
| 2241 uint32_t& unique_touch_event_id) { | 2241 uint32_t& unique_touch_event_id) { |
| 2242 moved_beyond_slop_region = false; | 2242 moved_beyond_slop_region = true; |
| 2243 if(!args->PeekNext().IsEmpty() && args->PeekNext()->IsString()) { | 2243 if(!args->PeekNext().IsEmpty() && args->PeekNext()->IsString()) { |
| 2244 std::string arg; | 2244 std::string arg; |
| 2245 if (args->GetNext(&arg) && arg == "movedBeyondSlopRegion") | 2245 if (args->GetNext(&arg) && arg == "movedInsideSlopRegion") |
|
tdresser
2017/02/06 14:25:59
Can we just get rid of this? It's never used.
lanwei
2017/02/06 21:36:23
Done.
| |
| 2246 moved_beyond_slop_region = true; | 2246 moved_beyond_slop_region = false; |
| 2247 else | 2247 else |
| 2248 args->ThrowError(); | 2248 args->ThrowError(); |
| 2249 } | 2249 } |
| 2250 | 2250 |
| 2251 unique_touch_event_id = GetUniqueTouchEventId(args); | 2251 unique_touch_event_id = GetUniqueTouchEventId(args); |
| 2252 return; | 2252 return; |
| 2253 } | 2253 } |
| 2254 | 2254 |
| 2255 uint32_t EventSender::GetUniqueTouchEventId(gin::Arguments* args) { | 2255 uint32_t EventSender::GetUniqueTouchEventId(gin::Arguments* args) { |
| 2256 uint32_t unique_touch_event_id; | 2256 uint32_t unique_touch_event_id; |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2901 return view()->mainFrame()->toWebLocalFrame()->frameWidget(); | 2901 return view()->mainFrame()->toWebLocalFrame()->frameWidget(); |
| 2902 } | 2902 } |
| 2903 | 2903 |
| 2904 std::unique_ptr<WebInputEvent> EventSender::TransformScreenToWidgetCoordinates( | 2904 std::unique_ptr<WebInputEvent> EventSender::TransformScreenToWidgetCoordinates( |
| 2905 const WebInputEvent& event) { | 2905 const WebInputEvent& event) { |
| 2906 return delegate()->TransformScreenToWidgetCoordinates( | 2906 return delegate()->TransformScreenToWidgetCoordinates( |
| 2907 web_widget_test_proxy_base_, event); | 2907 web_widget_test_proxy_base_, event); |
| 2908 } | 2908 } |
| 2909 | 2909 |
| 2910 } // namespace test_runner | 2910 } // namespace test_runner |
| OLD | NEW |