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

Side by Side Diff: device/gamepad/BUILD.gn

Issue 2081583002: Migrating majority of gamepad from content/browser/ to device/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final tweaks 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 unified diff | Download patch
« no previous file with comments | « device/device_tests.gyp ('k') | device/gamepad/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 import("//build/config/features.gni")
6
7 if (is_android) {
8 import("//build/config/android/config.gni")
9 import("//build/config/android/rules.gni") # For generate_jni().
10 }
11
12 component("gamepad") {
13 output_name = "device_gamepad"
14
15 sources = [
16 "gamepad_consumer.cc",
17 "gamepad_consumer.h",
18 "gamepad_data_fetcher.cc",
19 "gamepad_data_fetcher.h",
20 "gamepad_platform_data_fetcher.h",
21 "gamepad_platform_data_fetcher_android.cc",
22 "gamepad_platform_data_fetcher_android.h",
23 "gamepad_platform_data_fetcher_linux.cc",
24 "gamepad_platform_data_fetcher_linux.h",
25 "gamepad_platform_data_fetcher_mac.h",
26 "gamepad_platform_data_fetcher_mac.mm",
27 "gamepad_platform_data_fetcher_win.cc",
28 "gamepad_platform_data_fetcher_win.h",
29 "gamepad_provider.cc",
30 "gamepad_provider.h",
31 "gamepad_standard_mappings.cc",
32 "gamepad_standard_mappings.h",
33 "gamepad_standard_mappings_linux.cc",
34 "gamepad_standard_mappings_mac.mm",
35 "gamepad_standard_mappings_win.cc",
36 "gamepad_user_gesture.cc",
37 "gamepad_user_gesture.h",
38 "raw_input_data_fetcher_win.cc",
39 "raw_input_data_fetcher_win.h",
40 "xbox_data_fetcher_mac.cc",
41 "xbox_data_fetcher_mac.h",
42 ]
43
44 deps = [
45 "//base",
46 "//base/third_party/dynamic_annotations",
47 "//third_party/WebKit/public:blink_headers",
48 ]
49
50 defines = [ "DEVICE_GAMEPAD_IMPLEMENTATION" ]
51
52 if (is_win) {
53 cflags = [ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit ).
54 }
55
56 if (is_linux && use_udev) {
57 deps += [ "//device/udev_linux" ]
58 } else if (!is_win && !is_mac && !is_android) {
59 sources += [ "gamepad_platform_data_fetcher.cc" ]
60 sources -= [ "gamepad_platform_data_fetcher_linux.cc" ]
61 }
62
63 if (is_android) {
64 deps += [ ":jni_headers" ]
65 }
66
67 if (is_mac) {
68 libs = [
69 "CoreFoundation.framework",
70 "Foundation.framework",
71 "IOKit.framework",
72 ]
73 }
74 }
75
76 static_library("test_helpers") {
77 testonly = true
78
79 sources = [
80 "gamepad_test_helpers.cc",
81 "gamepad_test_helpers.h",
82 ]
83
84 public_deps = [
85 ":gamepad",
86 "//base",
87 "//third_party/WebKit/public:blink_headers",
88 ]
89 }
90
91 if (is_android) {
92 generate_jni("jni_headers") {
93 sources = [
94 "android/java/src/org/chromium/device/gamepad/GamepadList.java",
95 ]
96 jni_package = "gamepad"
97 }
98
99 android_library("java") {
100 java_files = [
101 "android/java/src/org/chromium/device/gamepad/GamepadDevice.java",
102 "android/java/src/org/chromium/device/gamepad/GamepadList.java",
103 "android/java/src/org/chromium/device/gamepad/GamepadMappings.java",
104 ]
105 deps = [
106 "//base:base_java",
107 ]
108 srcjar_deps = [ ":java_enums_srcjar" ]
109 }
110
111 java_cpp_enum("java_enums_srcjar") {
112 sources = [
113 "gamepad_standard_mappings.h",
114 ]
115 }
116 }
OLDNEW
« no previous file with comments | « device/device_tests.gyp ('k') | device/gamepad/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698