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

Unified Diff: device/gamepad/gamepad_platform_data_fetcher_linux.h

Issue 2129003002: Refactored gamepad polling to support dynamic sources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test issue and Mac XBoxDataFetcher constructor Created 4 years, 5 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: device/gamepad/gamepad_platform_data_fetcher_linux.h
diff --git a/device/gamepad/gamepad_platform_data_fetcher_linux.h b/device/gamepad/gamepad_platform_data_fetcher_linux.h
index 39907c9b6af48f14bdee8eeb5f3e396febb347e4..af45514c12152abab767d13b2585286b1ac37651 100644
--- a/device/gamepad/gamepad_platform_data_fetcher_linux.h
+++ b/device/gamepad/gamepad_platform_data_fetcher_linux.h
@@ -26,14 +26,21 @@ namespace device {
class GamepadPlatformDataFetcherLinux : public GamepadDataFetcher {
public:
+ typedef GamepadDataFetcherFactoryImpl<GamepadPlatformDataFetcherLinux,
+ GAMEPAD_SOURCE_LINUX_UDEV>
+ Factory;
+
GamepadPlatformDataFetcherLinux();
~GamepadPlatformDataFetcherLinux() override;
+ GamepadSource source() override;
+
// GamepadDataFetcher implementation.
- void GetGamepadData(blink::WebGamepads* pads,
- bool devices_changed_hint) override;
+ void GetGamepadData(bool devices_changed_hint) override;
private:
+ void OnAddedToProvider() override;
+
void RefreshDevice(udev_device* dev);
void EnumerateDevices();
void ReadDeviceData(size_t index);

Powered by Google App Engine
This is Rietveld 408576698