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

Unified Diff: content/browser/gamepad/gamepad_platform_data_fetcher_android.h

Issue 133943002: Gamepad API support for chrome on android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 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
Index: content/browser/gamepad/gamepad_platform_data_fetcher_android.h
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_android.h b/content/browser/gamepad/gamepad_platform_data_fetcher_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..fc9077ed4eda5dd96357e5024f6ee1094c0e1718
--- /dev/null
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_android.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2014 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.
+
+// Define the data fetcher that GamepadProvider will use for android port.
+// (GamepadPlatformDataFetcher).
+
+#ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_ANDROID_H_
+#define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_ANDROID_H_
+
+#include "content/browser/android/gamepad_reader_impl.h"
+#include "content/browser/gamepad/gamepad_data_fetcher.h"
+#include "content/browser/gamepad/gamepad_provider.h"
+
+#include "third_party/WebKit/public/platform/WebGamepads.h"
+
+#if defined(OS_ANDROID)
scottmg 2014/02/06 21:17:07 Remove this, it shouldn't be included elsewhere.
SaurabhK 2014/02/10 12:50:47 On 2014/02/06 21:17:07, scottmg wrote: Removed
+
+namespace content {
+using blink::WebGamepad;
+using blink::WebGamepads;
+
+class GamepadPlatformDataFetcherAndroid : public GamepadDataFetcher {
+ public:
+ GamepadPlatformDataFetcherAndroid();
+ ~GamepadPlatformDataFetcherAndroid();
+
+ // Method for sending pause hints to the JNI interface. Runs on
+ // polling_thread_.
+ virtual void PauseHint(bool ispaused) OVERRIDE;
+
+ virtual void GetGamepadData(blink::WebGamepads* pads,
+ bool devices_changed_hint) OVERRIDE;
scottmg 2014/02/06 21:17:07 nit; align at (.
SaurabhK 2014/02/10 12:50:47 On 2014/02/06 21:17:07, scottmg wrote: Done
+};
+} // namespace content
+
+#endif
+
+#endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698