summaryrefslogtreecommitdiff
path: root/chromium/ui/events/devices/BUILD.gn
blob: 427b658993a43fdd95c5a7d5fc00d6d68b59d360 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Copyright 2014 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/jumbo.gni")

if (is_android) {
  import("//build/config/android/config.gni")
  import("//build/config/android/rules.gni")
}

jumbo_component("devices") {
  sources = [
    "device_data_manager.cc",
    "device_data_manager.h",
    "device_hotplug_event_observer.h",
    "events_devices_export.h",
    "gamepad_device.cc",
    "gamepad_device.h",
    "input_device.cc",
    "input_device.h",
    "input_device_event_observer.h",
    "microphone_mute_switch_monitor.cc",
    "microphone_mute_switch_monitor.h",
    "stylus_state.h",
    "touch_device_transform.cc",
    "touch_device_transform.h",
    "touchscreen_device.cc",
    "touchscreen_device.h",
  ]

  if (is_linux || is_chromeos) {
    sources += [
      "device_util_linux.cc",
      "device_util_linux.h",
    ]
  }

  if (is_android) {
    sources += [
      "input_device_observer_android.cc",
      "input_device_observer_android.h",
    ]
  }

  if (is_win) {
    sources += [
      "input_device_observer_win.cc",
      "input_device_observer_win.h",
    ]
  }

  defines = [ "EVENTS_DEVICES_IMPLEMENTATION" ]

  public_deps = [
    "//ui/display/types",
    "//ui/gfx",
  ]

  deps = [
    "//base",
    "//base/third_party/dynamic_annotations",
    "//skia",
    "//ui/events:platform_event",
    "//ui/gfx:geometry_skia",
    "//ui/gfx/geometry",
  ]

  if (is_android) {
    deps += [ ":ui_events_devices_jni_headers" ]
  }
}

if (is_android) {
  generate_jni("ui_events_devices_jni_headers") {
    sources = [ "../../android/java/src/org/chromium/ui/events/devices/InputDeviceObserver.java" ]
  }
}

source_set("test_support") {
  sources = [
    "device_data_manager_test_api.cc",
    "device_data_manager_test_api.h",
  ]

  deps = [ "//base" ]

  public_deps = [ ":devices" ]
}