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

Unified Diff: content/renderer/pepper_plugin_delegate_impl.cc

Issue 9085027: Pepper gamepad support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove hardcoded size assert in favour of matching webkit size assert Created 8 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
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.h ('k') | ppapi/api/dev/ppb_gamepad_dev.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper_plugin_delegate_impl.cc
diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc
index 793543aab6023826167d59a56b6254a250392591..8a5c3ce2edad502656fe1bbd357d9b041234af3f 100644
--- a/content/renderer/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper_plugin_delegate_impl.cc
@@ -31,6 +31,7 @@
#include "content/common/view_messages.h"
#include "content/public/common/content_switches.h"
#include "content/public/renderer/content_renderer_client.h"
+#include "content/renderer/gamepad_shared_memory_reader.h"
#include "content/renderer/gpu/command_buffer_proxy.h"
#include "content/renderer/gpu/gpu_channel_host.h"
#include "content/renderer/gpu/renderer_gl_context.h"
@@ -2035,6 +2036,12 @@ bool PepperPluginDelegateImpl::IsInFullscreenMode() {
return render_view_->is_fullscreen();
}
+void PepperPluginDelegateImpl::SampleGamepads(WebKit::WebGamepads* data) {
+ if (!gamepad_shared_memory_reader_.get())
+ gamepad_shared_memory_reader_.reset(new content::GamepadSharedMemoryReader);
+ gamepad_shared_memory_reader_->SampleGamepads(*data);
+}
+
bool PepperPluginDelegateImpl::IsPageVisible() const {
return !render_view_->is_hidden();
}
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.h ('k') | ppapi/api/dev/ppb_gamepad_dev.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698