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

Unified Diff: content/renderer/render_thread_impl.h

Issue 195873019: Gamepad API: add support for connection events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add some more comments Created 6 years, 9 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.h
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 7f0f85b8e32c14d9ec5df43e3e5a8ba4da56ce43..d73e0fd9134e98a1ab7afece73c0662408bd87f7 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -34,6 +34,7 @@ struct WorkerProcessMsg_CreateWorker_Params;
namespace blink {
class WebGamepads;
+class WebGamepadListener;
class WebGraphicsContext3D;
class WebMediaStreamCenter;
class WebMediaStreamCenterClient;
@@ -367,6 +368,10 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
// Retrieve current gamepad data.
void SampleGamepads(blink::WebGamepads* data);
+ // Set a listener for gamepad connected/disconnected events.
+ // A non-null listener must be set first before calling SampleGamepads.
+ void SetGamepadListener(blink::WebGamepadListener* listener);
+
// Called by a RenderWidget when it is created or destroyed. This
// allows the process to know when there are no visible widgets.
void WidgetCreated();
@@ -526,7 +531,7 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
scoped_ptr<WebRTCIdentityService> webrtc_identity_service_;
- scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_;
+ scoped_refptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_;
// TODO(reveman): Allow AllocateGpuMemoryBuffer to be called from
// multiple threads. Current allocation mechanism for IOSurface

Powered by Google App Engine
This is Rietveld 408576698