OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 } | 1366 } |
1367 | 1367 |
1368 void RenderThreadImpl::SetFlingCurveParameters( | 1368 void RenderThreadImpl::SetFlingCurveParameters( |
1369 const std::vector<float>& new_touchpad, | 1369 const std::vector<float>& new_touchpad, |
1370 const std::vector<float>& new_touchscreen) { | 1370 const std::vector<float>& new_touchscreen) { |
1371 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1371 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
1372 new_touchscreen); | 1372 new_touchscreen); |
1373 | 1373 |
1374 } | 1374 } |
1375 | 1375 |
| 1376 void RenderThreadImpl::ResumeGamepads() { |
| 1377 if (!gamepad_shared_memory_reader_) |
| 1378 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); |
| 1379 gamepad_shared_memory_reader_->ResumeGamepads(); |
| 1380 } |
| 1381 |
| 1382 void RenderThreadImpl::PauseGamepads() { |
| 1383 if (!gamepad_shared_memory_reader_) |
| 1384 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); |
| 1385 gamepad_shared_memory_reader_->PauseGamepads(); |
| 1386 } |
| 1387 |
1376 void RenderThreadImpl::SampleGamepads(blink::WebGamepads* data) { | 1388 void RenderThreadImpl::SampleGamepads(blink::WebGamepads* data) { |
1377 if (!gamepad_shared_memory_reader_) | 1389 if (!gamepad_shared_memory_reader_) |
1378 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); | 1390 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); |
1379 gamepad_shared_memory_reader_->SampleGamepads(*data); | 1391 gamepad_shared_memory_reader_->SampleGamepads(*data); |
1380 } | 1392 } |
1381 | 1393 |
1382 void RenderThreadImpl::WidgetCreated() { | 1394 void RenderThreadImpl::WidgetCreated() { |
1383 widget_count_++; | 1395 widget_count_++; |
1384 } | 1396 } |
1385 | 1397 |
(...skipping 22 matching lines...) Expand all Loading... |
1408 hidden_widget_count_--; | 1420 hidden_widget_count_--; |
1409 | 1421 |
1410 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1422 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1411 return; | 1423 return; |
1412 } | 1424 } |
1413 | 1425 |
1414 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1426 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1415 } | 1427 } |
1416 | 1428 |
1417 } // namespace content | 1429 } // namespace content |
OLD | NEW |