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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/device_tests.gyp ('k') | device/gamepad/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/gamepad/BUILD.gn
diff --git a/device/gamepad/BUILD.gn b/device/gamepad/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..7c0d6695acfa00d1eb5250e9c40f0e4e149b8490
--- /dev/null
+++ b/device/gamepad/BUILD.gn
@@ -0,0 +1,116 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/features.gni")
+
+if (is_android) {
+ import("//build/config/android/config.gni")
+ import("//build/config/android/rules.gni") # For generate_jni().
+}
+
+component("gamepad") {
+ output_name = "device_gamepad"
+
+ sources = [
+ "gamepad_consumer.cc",
+ "gamepad_consumer.h",
+ "gamepad_data_fetcher.cc",
+ "gamepad_data_fetcher.h",
+ "gamepad_platform_data_fetcher.h",
+ "gamepad_platform_data_fetcher_android.cc",
+ "gamepad_platform_data_fetcher_android.h",
+ "gamepad_platform_data_fetcher_linux.cc",
+ "gamepad_platform_data_fetcher_linux.h",
+ "gamepad_platform_data_fetcher_mac.h",
+ "gamepad_platform_data_fetcher_mac.mm",
+ "gamepad_platform_data_fetcher_win.cc",
+ "gamepad_platform_data_fetcher_win.h",
+ "gamepad_provider.cc",
+ "gamepad_provider.h",
+ "gamepad_standard_mappings.cc",
+ "gamepad_standard_mappings.h",
+ "gamepad_standard_mappings_linux.cc",
+ "gamepad_standard_mappings_mac.mm",
+ "gamepad_standard_mappings_win.cc",
+ "gamepad_user_gesture.cc",
+ "gamepad_user_gesture.h",
+ "raw_input_data_fetcher_win.cc",
+ "raw_input_data_fetcher_win.h",
+ "xbox_data_fetcher_mac.cc",
+ "xbox_data_fetcher_mac.h",
+ ]
+
+ deps = [
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//third_party/WebKit/public:blink_headers",
+ ]
+
+ defines = [ "DEVICE_GAMEPAD_IMPLEMENTATION" ]
+
+ if (is_win) {
+ cflags = [ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit).
+ }
+
+ if (is_linux && use_udev) {
+ deps += [ "//device/udev_linux" ]
+ } else if (!is_win && !is_mac && !is_android) {
+ sources += [ "gamepad_platform_data_fetcher.cc" ]
+ sources -= [ "gamepad_platform_data_fetcher_linux.cc" ]
+ }
+
+ if (is_android) {
+ deps += [ ":jni_headers" ]
+ }
+
+ if (is_mac) {
+ libs = [
+ "CoreFoundation.framework",
+ "Foundation.framework",
+ "IOKit.framework",
+ ]
+ }
+}
+
+static_library("test_helpers") {
+ testonly = true
+
+ sources = [
+ "gamepad_test_helpers.cc",
+ "gamepad_test_helpers.h",
+ ]
+
+ public_deps = [
+ ":gamepad",
+ "//base",
+ "//third_party/WebKit/public:blink_headers",
+ ]
+}
+
+if (is_android) {
+ generate_jni("jni_headers") {
+ sources = [
+ "android/java/src/org/chromium/device/gamepad/GamepadList.java",
+ ]
+ jni_package = "gamepad"
+ }
+
+ android_library("java") {
+ java_files = [
+ "android/java/src/org/chromium/device/gamepad/GamepadDevice.java",
+ "android/java/src/org/chromium/device/gamepad/GamepadList.java",
+ "android/java/src/org/chromium/device/gamepad/GamepadMappings.java",
+ ]
+ deps = [
+ "//base:base_java",
+ ]
+ srcjar_deps = [ ":java_enums_srcjar" ]
+ }
+
+ java_cpp_enum("java_enums_srcjar") {
+ sources = [
+ "gamepad_standard_mappings.h",
+ ]
+ }
+}
« 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