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 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 const blink::WebSize& cumulative_scroll) { | 1031 const blink::WebSize& cumulative_scroll) { |
1032 bool is_main_thread = | 1032 bool is_main_thread = |
1033 main_thread_task_runner_.get() && | 1033 main_thread_task_runner_.get() && |
1034 main_thread_task_runner_->BelongsToCurrentThread(); | 1034 main_thread_task_runner_->BelongsToCurrentThread(); |
1035 return WebGestureCurveImpl::CreateFromDefaultPlatformCurve( | 1035 return WebGestureCurveImpl::CreateFromDefaultPlatformCurve( |
1036 gfx::Vector2dF(velocity.x, velocity.y), | 1036 gfx::Vector2dF(velocity.x, velocity.y), |
1037 gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height), | 1037 gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height), |
1038 is_main_thread).release(); | 1038 is_main_thread).release(); |
1039 } | 1039 } |
1040 | 1040 |
1041 void BlinkPlatformImpl::didStartWorkerRunLoop( | |
1042 const blink::WebWorkerRunLoop& runLoop) { | |
1043 // TODO(sad): Remove once this is removed from the blink::Platform interface. | |
1044 // http://crbug.com/461664 | |
1045 didStartWorkerRunLoop(); | |
1046 } | |
1047 | |
1048 void BlinkPlatformImpl::didStopWorkerRunLoop( | |
1049 const blink::WebWorkerRunLoop& runLoop) { | |
1050 // TODO(sad): Remove once this is removed from the blink::Platform interface. | |
1051 // http://crbug.com/461664 | |
1052 didStopWorkerRunLoop(); | |
1053 } | |
1054 | |
1055 void BlinkPlatformImpl::didStartWorkerRunLoop() { | 1041 void BlinkPlatformImpl::didStartWorkerRunLoop() { |
1056 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 1042 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
1057 worker_task_runner->OnWorkerRunLoopStarted(); | 1043 worker_task_runner->OnWorkerRunLoopStarted(); |
1058 } | 1044 } |
1059 | 1045 |
1060 void BlinkPlatformImpl::didStopWorkerRunLoop() { | 1046 void BlinkPlatformImpl::didStopWorkerRunLoop() { |
1061 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 1047 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
1062 worker_task_runner->OnWorkerRunLoopStopped(); | 1048 worker_task_runner->OnWorkerRunLoopStopped(); |
1063 } | 1049 } |
1064 | 1050 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1255 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
1270 static_cast<ui::DomCode>(dom_code))); | 1256 static_cast<ui::DomCode>(dom_code))); |
1271 } | 1257 } |
1272 | 1258 |
1273 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1259 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
1274 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1260 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
1275 code.utf8().data())); | 1261 code.utf8().data())); |
1276 } | 1262 } |
1277 | 1263 |
1278 } // namespace content | 1264 } // namespace content |
OLD | NEW |