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

Unified Diff: content/browser/renderer_host/gamepad_browser_message_filter.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/gamepad_browser_message_filter.h
diff --git a/content/browser/renderer_host/gamepad_browser_message_filter.h b/content/browser/renderer_host/gamepad_browser_message_filter.h
index 8661e71d7dc7ec010f454a71d5419dff817e6099..f328739caeb76354523602bd5cde964d3b1657dc 100644
--- a/content/browser/renderer_host/gamepad_browser_message_filter.h
+++ b/content/browser/renderer_host/gamepad_browser_message_filter.h
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/memory/shared_memory.h"
+#include "content/browser/gamepad/gamepad_consumer.h"
#include "content/public/browser/browser_message_filter.h"
namespace content {
@@ -14,7 +15,9 @@ namespace content {
class GamepadService;
class RenderProcessHost;
-class GamepadBrowserMessageFilter : public BrowserMessageFilter {
+class GamepadBrowserMessageFilter :
+ public BrowserMessageFilter,
+ public GamepadConsumer {
public:
GamepadBrowserMessageFilter();
@@ -22,6 +25,14 @@ class GamepadBrowserMessageFilter : public BrowserMessageFilter {
virtual bool OnMessageReceived(const IPC::Message& message,
bool* message_was_ok) OVERRIDE;
+ // GamepadConsumer implementation.
+ virtual void OnGamepadConnected(
+ unsigned index,
+ const blink::WebGamepad& gamepad) OVERRIDE;
+ virtual void OnGamepadDisconnected(
+ unsigned index,
+ const blink::WebGamepad& gamepad) OVERRIDE;
+
private:
virtual ~GamepadBrowserMessageFilter();
« no previous file with comments | « content/browser/gamepad/gamepad_service.cc ('k') | content/browser/renderer_host/gamepad_browser_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698