| 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 "content/child/blink_platform_impl.h" | 5 #include "content/child/blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve( | 1138 blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve( |
| 1139 blink::WebGestureDevice device_source, | 1139 blink::WebGestureDevice device_source, |
| 1140 const blink::WebFloatPoint& velocity, | 1140 const blink::WebFloatPoint& velocity, |
| 1141 const blink::WebSize& cumulative_scroll) { | 1141 const blink::WebSize& cumulative_scroll) { |
| 1142 return ui::WebGestureCurveImpl::CreateFromDefaultPlatformCurve( | 1142 return ui::WebGestureCurveImpl::CreateFromDefaultPlatformCurve( |
| 1143 gfx::Vector2dF(velocity.x, velocity.y), | 1143 gfx::Vector2dF(velocity.x, velocity.y), |
| 1144 gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height), | 1144 gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height), |
| 1145 IsMainThread()).release(); | 1145 IsMainThread()).release(); |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 blink::WebGestureCurve* BlinkPlatformImpl::createSmoothScrollAnimationCurve( |
| 1149 blink::WebGestureDevice device_source, |
| 1150 float start_x, |
| 1151 float start_y, |
| 1152 float dx, |
| 1153 float dy, |
| 1154 int64 duration) { |
| 1155 base::TimeDelta duration_time_delta = |
| 1156 base::TimeDelta::FromMilliseconds(duration); |
| 1157 return ui::WebGestureCurveImpl::CreateFromSmoothScrollingCurve( |
| 1158 start_x, start_y, dx, dy, duration_time_delta, IsMainThread()) |
| 1159 .release(); |
| 1160 } |
| 1161 |
| 1148 void BlinkPlatformImpl::didStartWorkerRunLoop() { | 1162 void BlinkPlatformImpl::didStartWorkerRunLoop() { |
| 1149 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 1163 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
| 1150 worker_task_runner->OnWorkerRunLoopStarted(); | 1164 worker_task_runner->OnWorkerRunLoopStarted(); |
| 1151 } | 1165 } |
| 1152 | 1166 |
| 1153 void BlinkPlatformImpl::didStopWorkerRunLoop() { | 1167 void BlinkPlatformImpl::didStopWorkerRunLoop() { |
| 1154 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 1168 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
| 1155 worker_task_runner->OnWorkerRunLoopStopped(); | 1169 worker_task_runner->OnWorkerRunLoopStopped(); |
| 1156 } | 1170 } |
| 1157 | 1171 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1378 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1365 static_cast<ui::DomCode>(dom_code))); | 1379 static_cast<ui::DomCode>(dom_code))); |
| 1366 } | 1380 } |
| 1367 | 1381 |
| 1368 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1382 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1369 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1383 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1370 code.utf8().data())); | 1384 code.utf8().data())); |
| 1371 } | 1385 } |
| 1372 | 1386 |
| 1373 } // namespace content | 1387 } // namespace content |
| OLD | NEW |