| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 4 | 5 |
| 5 #include "content/renderer/render_thread_impl.h" | 6 #include "content/renderer/render_thread_impl.h" |
| 6 | 7 |
| 7 #include <algorithm> | 8 #include <algorithm> |
| 8 #include <limits> | 9 #include <limits> |
| 9 #include <map> | 10 #include <map> |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1366 } | 1367 } |
| 1367 | 1368 |
| 1368 void RenderThreadImpl::SetFlingCurveParameters( | 1369 void RenderThreadImpl::SetFlingCurveParameters( |
| 1369 const std::vector<float>& new_touchpad, | 1370 const std::vector<float>& new_touchpad, |
| 1370 const std::vector<float>& new_touchscreen) { | 1371 const std::vector<float>& new_touchscreen) { |
| 1371 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1372 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
| 1372 new_touchscreen); | 1373 new_touchscreen); |
| 1373 | 1374 |
| 1374 } | 1375 } |
| 1375 | 1376 |
| 1377 #if defined(OS_ANDROID) |
| 1378 void RenderThreadImpl::ResumeGamepads() { |
| 1379 if (!gamepad_shared_memory_reader_) |
| 1380 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); |
| 1381 gamepad_shared_memory_reader_->ResumeGamepads(); |
| 1382 } |
| 1383 |
| 1384 void RenderThreadImpl::PauseGamepads() { |
| 1385 if (!gamepad_shared_memory_reader_) |
| 1386 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); |
| 1387 gamepad_shared_memory_reader_->PauseGamepads(); |
| 1388 } |
| 1389 #endif |
| 1390 |
| 1376 void RenderThreadImpl::SampleGamepads(blink::WebGamepads* data) { | 1391 void RenderThreadImpl::SampleGamepads(blink::WebGamepads* data) { |
| 1377 if (!gamepad_shared_memory_reader_) | 1392 if (!gamepad_shared_memory_reader_) |
| 1378 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); | 1393 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); |
| 1379 gamepad_shared_memory_reader_->SampleGamepads(*data); | 1394 gamepad_shared_memory_reader_->SampleGamepads(*data); |
| 1380 } | 1395 } |
| 1381 | 1396 |
| 1382 base::ProcessId RenderThreadImpl::renderer_process_id() const { | 1397 base::ProcessId RenderThreadImpl::renderer_process_id() const { |
| 1383 return renderer_process_id_; | 1398 return renderer_process_id_; |
| 1384 } | 1399 } |
| 1385 | 1400 |
| 1386 } // namespace content | 1401 } // namespace content |
| OLD | NEW |