| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Define the default data fetcher that GamepadProvider will use if none is | |
| 6 // supplied. (GamepadPlatformDataFetcher). | |
| 7 | |
| 8 #ifndef CONTENT_BROWSER_GAMEPAD_PLATFORM_DATA_FETCHER_H_ | |
| 9 #define CONTENT_BROWSER_GAMEPAD_PLATFORM_DATA_FETCHER_H_ | |
| 10 | |
| 11 #if defined(OS_WIN) | |
| 12 #include "content/browser/gamepad/platform_data_fetcher_win.h" | |
| 13 #elif defined(OS_MACOSX) | |
| 14 #include "content/browser/gamepad/platform_data_fetcher_mac.h" | |
| 15 #elif defined(OS_LINUX) | |
| 16 #include "content/browser/gamepad/platform_data_fetcher_linux.h" | |
| 17 #endif | |
| 18 | |
| 19 namespace content { | |
| 20 | |
| 21 #if defined(OS_WIN) | |
| 22 | |
| 23 typedef GamepadPlatformDataFetcherWin GamepadPlatformDataFetcher; | |
| 24 | |
| 25 #elif defined(OS_MACOSX) | |
| 26 | |
| 27 typedef GamepadPlatformDataFetcherMac GamepadPlatformDataFetcher; | |
| 28 | |
| 29 #elif defined(OS_LINUX) | |
| 30 | |
| 31 typedef GamepadPlatformDataFetcherLinux GamepadPlatformDataFetcher; | |
| 32 | |
| 33 #else | |
| 34 | |
| 35 class GamepadDataFetcherEmpty : public GamepadDataFetcher { | |
| 36 public: | |
| 37 void GetGamepadData(WebKit::WebGamepads* pads, bool) { | |
| 38 pads->length = 0; | |
| 39 } | |
| 40 }; | |
| 41 typedef GamepadDataFetcherEmpty GamepadPlatformDataFetcher; | |
| 42 | |
| 43 #endif | |
| 44 | |
| 45 } // namespace content | |
| 46 | |
| 47 #endif // CONTENT_BROWSER_GAMEPAD_PLATFORM_DATA_FETCHER_H_ | |
| OLD | NEW |