| 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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( | 1041 void BlinkPlatformImpl::didStartWorkerRunLoop( |
| 1042 const blink::WebWorkerRunLoop& runLoop) { | 1042 const blink::WebWorkerRunLoop& runLoop) { |
| 1043 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 1043 // TODO(sad): Remove once this is removed from the blink::Platform interface. |
| 1044 worker_task_runner->OnWorkerRunLoopStarted(runLoop); | 1044 // http://crbug.com/461664 |
| 1045 didStartWorkerRunLoop(); |
| 1045 } | 1046 } |
| 1046 | 1047 |
| 1047 void BlinkPlatformImpl::didStopWorkerRunLoop( | 1048 void BlinkPlatformImpl::didStopWorkerRunLoop( |
| 1048 const blink::WebWorkerRunLoop& runLoop) { | 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() { |
| 1049 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 1056 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
| 1050 worker_task_runner->OnWorkerRunLoopStopped(runLoop); | 1057 worker_task_runner->OnWorkerRunLoopStarted(); |
| 1058 } |
| 1059 |
| 1060 void BlinkPlatformImpl::didStopWorkerRunLoop() { |
| 1061 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
| 1062 worker_task_runner->OnWorkerRunLoopStopped(); |
| 1051 } | 1063 } |
| 1052 | 1064 |
| 1053 blink::WebCrypto* BlinkPlatformImpl::crypto() { | 1065 blink::WebCrypto* BlinkPlatformImpl::crypto() { |
| 1054 return &web_crypto_; | 1066 return &web_crypto_; |
| 1055 } | 1067 } |
| 1056 | 1068 |
| 1057 blink::WebGeofencingProvider* BlinkPlatformImpl::geofencingProvider() { | 1069 blink::WebGeofencingProvider* BlinkPlatformImpl::geofencingProvider() { |
| 1058 return geofencing_provider_.get(); | 1070 return geofencing_provider_.get(); |
| 1059 } | 1071 } |
| 1060 | 1072 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1257 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1269 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1258 static_cast<ui::DomCode>(dom_code))); | 1270 static_cast<ui::DomCode>(dom_code))); |
| 1259 } | 1271 } |
| 1260 | 1272 |
| 1261 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1273 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1262 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1274 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1263 code.utf8().data())); | 1275 code.utf8().data())); |
| 1264 } | 1276 } |
| 1265 | 1277 |
| 1266 } // namespace content | 1278 } // namespace content |
| OLD | NEW |