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

Unified Diff: content/browser/renderer_host/gamepad_browser_message_filter.h

Issue 8689012: Message receiver on browser side that holds/starts the gamepad data provider (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: newline at eof Created 9 years, 1 month 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
new file mode 100644
index 0000000000000000000000000000000000000000..80acd1657816323c6149033a961a0cd3f807f870
--- /dev/null
+++ b/content/browser/renderer_host/gamepad_browser_message_filter.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_RENDERER_HOST_GAMEPAD_BROWSER_MESSAGE_FILTER_H_
+#define CONTENT_BROWSER_RENDERER_HOST_GAMEPAD_BROWSER_MESSAGE_FILTER_H_
+#pragma once
+
+#include "content/browser/browser_message_filter.h"
+#include "content/browser/gamepad/gamepad_provider.h"
+
+class GamepadBrowserMessageFilter
+ : public BrowserMessageFilter {
jam 2011/11/24 23:16:02 nit: can fit on one line
scottmg 2011/11/24 23:54:51 Done.
+ public:
+ // BrowserMessageFilter implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok);
+ GamepadBrowserMessageFilter();
+
+ private:
+ virtual ~GamepadBrowserMessageFilter();
+
+ void OnGamepadStartPolling(IPC::Message* reply_msg);
+ void OnGamepadStopPolling(IPC::Message* reply_msg);
+
+ scoped_refptr<gamepad::Provider> provider_;
+};
jam 2011/11/24 23:16:02 nit: add DISALLOW_COPY_AND_ASSIGN
scottmg 2011/11/24 23:54:51 Done.
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_GAMEPAD_BROWSER_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698