Chromium Code Reviews| 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..ee3fd1c01306c842d9601eb9c54c5d8e49c48149 |
| --- /dev/null |
| +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_android.h |
| @@ -0,0 +1,41 @@ |
| +// 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 <jni.h> |
| + |
| +#include "base/android/jni_android.h" |
| +#include "content/browser/gamepad/gamepad_data_fetcher.h" |
| +#include "content/browser/gamepad/gamepad_provider.h" |
| +#include "content/browser/gamepad/gamepad_standard_mappings.h" |
| +#include "third_party/WebKit/public/platform/WebGamepads.h" |
| + |
| +namespace content { |
| +using blink::WebGamepads; |
|
jdduke (slow)
2014/04/21 19:53:58
Nit: using Foo; is best left out of headers, and i
SaurabhK
2014/04/22 09:33:53
On 2014/04/21 19:53:58, jdduke wrote:
Removed it
|
| + |
| +class GamepadPlatformDataFetcherAndroid : public GamepadDataFetcher { |
| + public: |
| + GamepadPlatformDataFetcherAndroid(); |
| + ~GamepadPlatformDataFetcherAndroid(); |
| + |
| + virtual void PauseHint(bool paused) OVERRIDE; |
| + |
| + virtual void GetGamepadData(blink::WebGamepads* pads, |
| + bool devices_changed_hint) OVERRIDE; |
| + |
| + // Registers the JNI methods for GamepadsReader. |
| + static bool RegisterGamepadPlatformDataFetcherAndroid(JNIEnv* env); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherAndroid); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_ANDROID_H_ |