OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Define the default data fetcher that GamepadProvider will use if none is | 5 // Define the default data fetcher that GamepadProvider will use if none is |
6 // supplied. (GamepadPlatformDataFetcher). | 6 // supplied. (GamepadPlatformDataFetcher). |
7 | 7 |
8 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_ | 8 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_ |
9 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_ | 9 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_ |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
26 | 26 |
27 typedef GamepadPlatformDataFetcherWin GamepadPlatformDataFetcher; | 27 typedef GamepadPlatformDataFetcherWin GamepadPlatformDataFetcher; |
28 | 28 |
29 #elif defined(OS_MACOSX) | 29 #elif defined(OS_MACOSX) |
30 | 30 |
31 typedef GamepadPlatformDataFetcherMac GamepadPlatformDataFetcher; | 31 typedef GamepadPlatformDataFetcherMac GamepadPlatformDataFetcher; |
32 | 32 |
33 #elif defined(OS_LINUX) | 33 #elif defined(OS_LINUX) && defined(USE_UDEV) |
34 | 34 |
35 typedef GamepadPlatformDataFetcherLinux GamepadPlatformDataFetcher; | 35 typedef GamepadPlatformDataFetcherLinux GamepadPlatformDataFetcher; |
36 | 36 |
37 #else | 37 #else |
38 | 38 |
39 class GamepadDataFetcherEmpty : public GamepadDataFetcher { | 39 class GamepadDataFetcherEmpty : public GamepadDataFetcher { |
40 public: | 40 public: |
41 GamepadDataFetcherEmpty(); | 41 GamepadDataFetcherEmpty(); |
42 | 42 |
43 virtual void GetGamepadData(blink::WebGamepads* pads, | 43 virtual void GetGamepadData(blink::WebGamepads* pads, |
44 bool devices_changed_hint) OVERRIDE; | 44 bool devices_changed_hint) OVERRIDE; |
45 | 45 |
46 private: | 46 private: |
47 DISALLOW_COPY_AND_ASSIGN(GamepadDataFetcherEmpty); | 47 DISALLOW_COPY_AND_ASSIGN(GamepadDataFetcherEmpty); |
48 }; | 48 }; |
49 typedef GamepadDataFetcherEmpty GamepadPlatformDataFetcher; | 49 typedef GamepadDataFetcherEmpty GamepadPlatformDataFetcher; |
50 | 50 |
51 #endif | 51 #endif |
52 | 52 |
53 } // namespace content | 53 } // namespace content |
54 | 54 |
55 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_ | 55 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_ |
OLD | NEW |