Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: content/renderer/render_thread_impl.cc

Issue 133943002: Gamepad API support for chrome on android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index ed604a9ab5143669fce7c47a72baf62a35675385..5524aff7114d4f21b203a084ec82c2f1b5cee250 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1373,6 +1373,18 @@ void RenderThreadImpl::SetFlingCurveParameters(
}
+void RenderThreadImpl::ResumeGamepads() {
+ if (!gamepad_shared_memory_reader_)
+ gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader);
+ gamepad_shared_memory_reader_->ResumeGamepads();
+}
+
+void RenderThreadImpl::PauseGamepads() {
+ if (!gamepad_shared_memory_reader_)
+ gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader);
+ gamepad_shared_memory_reader_->PauseGamepads();
+}
+
void RenderThreadImpl::SampleGamepads(blink::WebGamepads* data) {
if (!gamepad_shared_memory_reader_)
gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader);

Powered by Google App Engine
This is Rietveld 408576698