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

Side by Side Diff: content/browser/gamepad/gamepad_platform_data_fetcher.h

Issue 133943002: Gamepad API support for chrome on android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 4 // found in the LICENSE file.
4 5
5 // Define the default data fetcher that GamepadProvider will use if none is 6 // Define the default data fetcher that GamepadProvider will use if none is
6 // supplied. (GamepadPlatformDataFetcher). 7 // supplied. (GamepadPlatformDataFetcher).
7 8
8 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_ 9 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_
9 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_ 10 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_
10 11
11 #include "base/basictypes.h" 12 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
13 #include "content/browser/gamepad/gamepad_data_fetcher.h" 14 #include "content/browser/gamepad/gamepad_data_fetcher.h"
14 15
15 #if defined(OS_WIN) 16 #if defined(OS_WIN)
16 #include "content/browser/gamepad/gamepad_platform_data_fetcher_win.h" 17 #include "content/browser/gamepad/gamepad_platform_data_fetcher_win.h"
17 #elif defined(OS_MACOSX) 18 #elif defined(OS_MACOSX)
18 #include "content/browser/gamepad/gamepad_platform_data_fetcher_mac.h" 19 #include "content/browser/gamepad/gamepad_platform_data_fetcher_mac.h"
19 #elif defined(OS_LINUX) 20 #elif defined(OS_LINUX)
20 #include "content/browser/gamepad/gamepad_platform_data_fetcher_linux.h" 21 #include "content/browser/gamepad/gamepad_platform_data_fetcher_linux.h"
22 #elif defined(OS_ANDROID)
23 #include "content/browser/gamepad/gamepad_platform_data_fetcher_android.h"
21 #endif 24 #endif
22 25
23 namespace content { 26 namespace content {
24 27
25 #if defined(OS_WIN) 28 #if defined(OS_WIN)
26 29
27 typedef GamepadPlatformDataFetcherWin GamepadPlatformDataFetcher; 30 typedef GamepadPlatformDataFetcherWin GamepadPlatformDataFetcher;
28 31
29 #elif defined(OS_MACOSX) 32 #elif defined(OS_MACOSX)
30 33
31 typedef GamepadPlatformDataFetcherMac GamepadPlatformDataFetcher; 34 typedef GamepadPlatformDataFetcherMac GamepadPlatformDataFetcher;
32 35
33 #elif defined(OS_LINUX) && defined(USE_UDEV) 36 #elif defined(OS_LINUX) && defined(USE_UDEV)
34 37
35 typedef GamepadPlatformDataFetcherLinux GamepadPlatformDataFetcher; 38 typedef GamepadPlatformDataFetcherLinux GamepadPlatformDataFetcher;
36 39
40 #elif defined(OS_ANDROID)
41
42 typedef GamepadPlatformDataFetcherAndroid GamepadPlatformDataFetcher;
43
37 #else 44 #else
38 45
39 class GamepadDataFetcherEmpty : public GamepadDataFetcher { 46 class GamepadDataFetcherEmpty : public GamepadDataFetcher {
40 public: 47 public:
41 GamepadDataFetcherEmpty(); 48 GamepadDataFetcherEmpty();
42 49
43 virtual void GetGamepadData(blink::WebGamepads* pads, 50 virtual void GetGamepadData(blink::WebGamepads* pads,
44 bool devices_changed_hint) OVERRIDE; 51 bool devices_changed_hint) OVERRIDE;
45 52
46 private: 53 private:
47 DISALLOW_COPY_AND_ASSIGN(GamepadDataFetcherEmpty); 54 DISALLOW_COPY_AND_ASSIGN(GamepadDataFetcherEmpty);
48 }; 55 };
49 typedef GamepadDataFetcherEmpty GamepadPlatformDataFetcher; 56 typedef GamepadDataFetcherEmpty GamepadPlatformDataFetcher;
50 57
51 #endif 58 #endif
52 59
53 } // namespace content 60 } // namespace content
54 61
55 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_ 62 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698