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..0cd8f5c0cde7453200b0e9567ef32bd8d33f9c54 |
| --- /dev/null |
| +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_android.h |
| @@ -0,0 +1,48 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
|
Ted C
2014/04/16 23:36:53
no (c)
SaurabhK
2014/04/18 14:51:57
On 2014/04/16 23:36:53, Ted C wrote:
Is it?
I noti
kbalazs
2014/04/18 15:21:20
(c) is deprecated. It's there in a lot of files bu
|
| +// 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" |
|
Ted C
2014/04/16 23:36:53
no blank line above this.
SaurabhK
2014/04/18 14:51:57
On 2014/04/16 23:36:53, Ted C wrote:
Done.
|
| + |
| +namespace content { |
| +using blink::WebGamepad; |
|
Ted C
2014/04/16 23:36:53
you are fully qualifying blink::WebGamepads, so I
SaurabhK
2014/04/18 14:51:57
On 2014/04/16 23:36:53, Ted C wrote:
Removed it.
|
| +using blink::WebGamepads; |
| + |
| +class GamepadPlatformDataFetcherAndroid : public GamepadDataFetcher { |
| + public: |
| + GamepadPlatformDataFetcherAndroid(); |
| + ~GamepadPlatformDataFetcherAndroid(); |
| + |
| + // Method for sending pause hints to the JNI interface. Runs on |
| + // polling_thread_. |
|
Ted C
2014/04/16 23:36:53
polling_thread_ is a private class variable in gam
SaurabhK
2014/04/18 14:51:57
On 2014/04/16 23:36:53, Ted C wrote:
Dropping the
|
| + virtual void PauseHint(bool ispaused) OVERRIDE; |
|
Ted C
2014/04/16 23:36:53
is_paused or just paused to match the overridden m
SaurabhK
2014/04/18 14:51:57
On 2014/04/16 23:36:53, Ted C wrote:
Using paused
|
| + |
| + virtual void GetGamepadData(blink::WebGamepads* pads, |
| + bool devices_changed_hint) OVERRIDE; |
| + |
| + // Registers the JNI methods for GamepadsReader. |
| + static bool RegisterGamepadPlatformDataFetcherAndroid(JNIEnv* env); |
| + |
| + private: |
| + // Data to fetch into. |
| + blink::WebGamepads* gamepads_data_; |
|
jdduke (slow)
2014/04/16 23:23:44
I think you can remove this variable now?
Ted C
2014/04/16 23:36:53
this doesn't look used in the implementation
SaurabhK
2014/04/18 14:51:57
On 2014/04/16 23:36:53, Ted C wrote:
Removed.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherAndroid); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_ANDROID_H_ |