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

Unified Diff: content/browser/renderer_host/pepper/pepper_gamepad_host.h

Issue 195873019: Gamepad API: add support for connection events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: and a missing override Created 6 years, 7 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/browser/renderer_host/pepper/pepper_gamepad_host.h
diff --git a/content/browser/renderer_host/pepper/pepper_gamepad_host.h b/content/browser/renderer_host/pepper/pepper_gamepad_host.h
index 1db73aa694a5ebbfba38f200bc2b84cc268f0a3e..c9f2c18fbc64ad1394b1aa7bcc4117f4e91a395d 100644
--- a/content/browser/renderer_host/pepper/pepper_gamepad_host.h
+++ b/content/browser/renderer_host/pepper/pepper_gamepad_host.h
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
+#include "content/browser/gamepad/gamepad_consumer.h"
#include "content/common/content_export.h"
#include "ppapi/host/resource_host.h"
@@ -21,7 +22,9 @@ namespace content {
class BrowserPpapiHost;
class GamepadService;
-class CONTENT_EXPORT PepperGamepadHost : public ppapi::host::ResourceHost {
+class CONTENT_EXPORT PepperGamepadHost :
+ public ppapi::host::ResourceHost,
+ public GamepadConsumer {
public:
PepperGamepadHost(BrowserPpapiHost* host,
PP_Instance instance,
@@ -40,6 +43,14 @@ class CONTENT_EXPORT PepperGamepadHost : public ppapi::host::ResourceHost {
const IPC::Message& msg,
ppapi::host::HostMessageContext* context) OVERRIDE;
+ // GamepadConsumer implementation.
+ virtual void OnGamepadConnected(
+ unsigned index,
+ const blink::WebGamepad& gamepad) OVERRIDE {}
+ virtual void OnGamepadDisconnected(
+ unsigned index,
+ const blink::WebGamepad& gamepad) OVERRIDE {}
+
private:
int32_t OnRequestMemory(ppapi::host::HostMessageContext* context);

Powered by Google App Engine
This is Rietveld 408576698