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 "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( | 1041 void BlinkPlatformImpl::didStartWorkerRunLoop( |
|
kinuko
2015/02/26 03:28:03
nit: would be nice to have a TODO comment that thi
sadrul
2015/02/26 05:00:22
Done.
| |
| 1042 const blink::WebWorkerRunLoop& runLoop) { | 1042 const blink::WebWorkerRunLoop& runLoop) { |
| 1043 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 1043 didStartWorkerRunLoop(); |
| 1044 worker_task_runner->OnWorkerRunLoopStarted(runLoop); | |
| 1045 } | 1044 } |
| 1046 | 1045 |
| 1047 void BlinkPlatformImpl::didStopWorkerRunLoop( | 1046 void BlinkPlatformImpl::didStopWorkerRunLoop( |
| 1048 const blink::WebWorkerRunLoop& runLoop) { | 1047 const blink::WebWorkerRunLoop& runLoop) { |
|
kinuko
2015/02/26 03:28:03
ditto
sadrul
2015/02/26 05:00:22
Done.
| |
| 1048 didStopWorkerRunLoop(); | |
| 1049 } | |
| 1050 | |
| 1051 void BlinkPlatformImpl::didStartWorkerRunLoop() { | |
| 1049 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 1052 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
| 1050 worker_task_runner->OnWorkerRunLoopStopped(runLoop); | 1053 worker_task_runner->OnWorkerRunLoopStarted(); |
| 1054 } | |
| 1055 | |
| 1056 void BlinkPlatformImpl::didStopWorkerRunLoop() { | |
| 1057 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | |
| 1058 worker_task_runner->OnWorkerRunLoopStopped(); | |
| 1051 } | 1059 } |
| 1052 | 1060 |
| 1053 blink::WebCrypto* BlinkPlatformImpl::crypto() { | 1061 blink::WebCrypto* BlinkPlatformImpl::crypto() { |
| 1054 return &web_crypto_; | 1062 return &web_crypto_; |
| 1055 } | 1063 } |
| 1056 | 1064 |
| 1057 blink::WebGeofencingProvider* BlinkPlatformImpl::geofencingProvider() { | 1065 blink::WebGeofencingProvider* BlinkPlatformImpl::geofencingProvider() { |
| 1058 return geofencing_provider_.get(); | 1066 return geofencing_provider_.get(); |
| 1059 } | 1067 } |
| 1060 | 1068 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1257 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1265 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1258 static_cast<ui::DomCode>(dom_code))); | 1266 static_cast<ui::DomCode>(dom_code))); |
| 1259 } | 1267 } |
| 1260 | 1268 |
| 1261 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1269 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1262 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1270 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1263 code.utf8().data())); | 1271 code.utf8().data())); |
| 1264 } | 1272 } |
| 1265 | 1273 |
| 1266 } // namespace content | 1274 } // namespace content |
| OLD | NEW |