OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 | 6 |
7 if (is_android) { | 7 if (is_android) { |
8 import("//build/config/android/config.gni") | 8 import("//build/config/android/config.gni") |
9 import("//build/config/android/rules.gni") # For generate_jni(). | 9 import("//build/config/android/rules.gni") # For generate_jni(). |
10 } | 10 } |
11 | 11 |
12 component("gamepad") { | 12 component("gamepad") { |
13 output_name = "device_gamepad" | 13 output_name = "device_gamepad" |
14 | 14 |
15 sources = [ | 15 sources = [ |
16 "android/gamepad_jni_registrar.cc", | 16 "android/gamepad_jni_registrar.cc", |
17 "android/gamepad_jni_registrar.h", | 17 "android/gamepad_jni_registrar.h", |
18 "gamepad_consumer.cc", | 18 "gamepad_consumer.cc", |
19 "gamepad_consumer.h", | 19 "gamepad_consumer.h", |
20 "gamepad_data_fetcher.cc", | 20 "gamepad_data_fetcher.cc", |
21 "gamepad_data_fetcher.h", | 21 "gamepad_data_fetcher.h", |
| 22 "gamepad_data_fetcher_manager.cc", |
| 23 "gamepad_data_fetcher_manager.h", |
| 24 "gamepad_pad_state_provider.cc", |
| 25 "gamepad_pad_state_provider.h", |
22 "gamepad_platform_data_fetcher.h", | 26 "gamepad_platform_data_fetcher.h", |
23 "gamepad_platform_data_fetcher_android.cc", | 27 "gamepad_platform_data_fetcher_android.cc", |
24 "gamepad_platform_data_fetcher_android.h", | 28 "gamepad_platform_data_fetcher_android.h", |
25 "gamepad_platform_data_fetcher_linux.cc", | 29 "gamepad_platform_data_fetcher_linux.cc", |
26 "gamepad_platform_data_fetcher_linux.h", | 30 "gamepad_platform_data_fetcher_linux.h", |
27 "gamepad_platform_data_fetcher_mac.h", | 31 "gamepad_platform_data_fetcher_mac.h", |
28 "gamepad_platform_data_fetcher_mac.mm", | 32 "gamepad_platform_data_fetcher_mac.mm", |
29 "gamepad_platform_data_fetcher_win.cc", | 33 "gamepad_platform_data_fetcher_win.cc", |
30 "gamepad_platform_data_fetcher_win.h", | 34 "gamepad_platform_data_fetcher_win.h", |
31 "gamepad_provider.cc", | 35 "gamepad_provider.cc", |
32 "gamepad_provider.h", | 36 "gamepad_provider.h", |
33 "gamepad_standard_mappings.cc", | 37 "gamepad_standard_mappings.cc", |
34 "gamepad_standard_mappings.h", | 38 "gamepad_standard_mappings.h", |
35 "gamepad_standard_mappings_linux.cc", | 39 "gamepad_standard_mappings_linux.cc", |
36 "gamepad_standard_mappings_mac.mm", | 40 "gamepad_standard_mappings_mac.mm", |
37 "gamepad_standard_mappings_win.cc", | 41 "gamepad_standard_mappings_win.cc", |
38 "gamepad_user_gesture.cc", | 42 "gamepad_user_gesture.cc", |
39 "gamepad_user_gesture.h", | 43 "gamepad_user_gesture.h", |
40 "raw_input_data_fetcher_win.cc", | 44 "raw_input_data_fetcher_win.cc", |
41 "raw_input_data_fetcher_win.h", | 45 "raw_input_data_fetcher_win.h", |
42 "xbox_data_fetcher_mac.cc", | |
43 "xbox_data_fetcher_mac.h", | 46 "xbox_data_fetcher_mac.h", |
| 47 "xbox_data_fetcher_mac.mm", |
44 ] | 48 ] |
45 | 49 |
46 deps = [ | 50 deps = [ |
47 "//base", | 51 "//base", |
48 "//base/third_party/dynamic_annotations", | 52 "//base/third_party/dynamic_annotations", |
49 "//third_party/WebKit/public:blink_headers", | 53 "//third_party/WebKit/public:blink_headers", |
50 ] | 54 ] |
51 | 55 |
52 defines = [ "DEVICE_GAMEPAD_IMPLEMENTATION" ] | 56 defines = [ "DEVICE_GAMEPAD_IMPLEMENTATION" ] |
53 | 57 |
54 if (is_win) { | 58 if (is_win) { |
55 cflags = [ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit
). | 59 cflags = [ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit
). |
56 } | 60 } |
57 | 61 |
58 if (is_linux && use_udev) { | 62 if (is_linux && use_udev) { |
59 deps += [ "//device/udev_linux" ] | 63 deps += [ "//device/udev_linux" ] |
60 } else if (!is_win && !is_mac && !is_android) { | 64 } else if (!is_win && !is_mac && !is_android) { |
61 sources += [ "gamepad_platform_data_fetcher.cc" ] | |
62 sources -= [ "gamepad_platform_data_fetcher_linux.cc" ] | 65 sources -= [ "gamepad_platform_data_fetcher_linux.cc" ] |
63 } | 66 } |
64 | 67 |
65 if (is_android) { | 68 if (is_android) { |
66 deps += [ ":jni_headers" ] | 69 deps += [ ":jni_headers" ] |
67 } | 70 } |
68 | 71 |
69 if (is_mac) { | 72 if (is_mac) { |
70 libs = [ | 73 libs = [ |
71 "CoreFoundation.framework", | 74 "CoreFoundation.framework", |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 ] | 113 ] |
111 srcjar_deps = [ ":java_enums_srcjar" ] | 114 srcjar_deps = [ ":java_enums_srcjar" ] |
112 } | 115 } |
113 | 116 |
114 java_cpp_enum("java_enums_srcjar") { | 117 java_cpp_enum("java_enums_srcjar") { |
115 sources = [ | 118 sources = [ |
116 "gamepad_standard_mappings.h", | 119 "gamepad_standard_mappings.h", |
117 ] | 120 ] |
118 } | 121 } |
119 } | 122 } |
OLD | NEW |