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

Unified Diff: content/renderer/render_thread_impl.h

Issue 470683002: Revert "Refactor code listening to platform events in content/renderer/." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « content/renderer/gamepad_shared_memory_reader.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.h
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 68828f67cb87210463264b595da4765f758ac17b..25bd1844dc98cdbe74295ecae127bc6e4030298c 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -36,6 +36,7 @@ struct WorkerProcessMsg_CreateWorker_Params;
namespace blink {
class WebGamepads;
+class WebGamepadListener;
class WebGraphicsContext3D;
class WebMediaStreamCenter;
class WebMediaStreamCenterClient;
@@ -83,6 +84,7 @@ class DBMessageFilter;
class DevToolsAgentFilter;
class DomStorageDispatcher;
class EmbeddedWorkerDispatcher;
+class GamepadSharedMemoryReader;
class GpuChannelHost;
class IndexedDBDispatcher;
class InputEventFilter;
@@ -288,6 +290,10 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
return vc_manager_.get();
}
+ GamepadSharedMemoryReader* gamepad_shared_memory_reader() const {
+ return gamepad_shared_memory_reader_.get();
+ }
+
// Get the GPU channel. Returns NULL if the channel is not established or
// has been lost.
GpuChannelHost* GetGpuChannel();
@@ -385,6 +391,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();
@@ -560,6 +570,8 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
scoped_ptr<WebRTCIdentityService> webrtc_identity_service_;
#endif
+ scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_;
+
// TODO(reveman): Allow AllocateGpuMemoryBuffer to be called from
// multiple threads. Current allocation mechanism for IOSurface
// backed GpuMemoryBuffers prevent this. crbug.com/325045
« no previous file with comments | « content/renderer/gamepad_shared_memory_reader.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698