summaryrefslogtreecommitdiff
path: root/chromium/chromecast/graphics/BUILD.gn
blob: ec2e533296ba78a958e53824f4cb84fe58e676ed (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Copyright 2015 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/ui.gni")
import("//chromecast/chromecast.gni")
import("//testing/test.gni")

cast_source_set("graphics") {
  sources = [
    "cast_touch_activity_observer.h",
    "cast_window_manager.h",
    "gestures/cast_gesture_handler.cc",
    "gestures/cast_gesture_handler.h",
    "rounded_window_corners.cc",
    "rounded_window_corners.h",
  ]

  deps = [
    "//base",
    "//ui/gfx",
  ]

  public_deps = [ "//chromecast/ui/mojom" ]

  if (use_aura) {
    sources += [
      "accessibility/accessibility_cursor_ring_layer.cc",
      "accessibility/accessibility_cursor_ring_layer.h",
      "accessibility/accessibility_focus_ring.cc",
      "accessibility/accessibility_focus_ring.h",
      "accessibility/accessibility_focus_ring_controller.cc",
      "accessibility/accessibility_focus_ring_controller.h",
      "accessibility/accessibility_focus_ring_layer.cc",
      "accessibility/accessibility_focus_ring_layer.h",
      "accessibility/accessibility_highlight_layer.cc",
      "accessibility/accessibility_highlight_layer.h",
      "accessibility/accessibility_layer.cc",
      "accessibility/accessibility_layer.h",
      "accessibility/accessibility_observer.h",
      "accessibility/focus_ring_controller.cc",
      "accessibility/focus_ring_controller.h",
      "accessibility/focus_ring_layer.cc",
      "accessibility/focus_ring_layer.h",
      "accessibility/fullscreen_magnification_controller.cc",
      "accessibility/fullscreen_magnification_controller.h",
      "accessibility/magnification_controller.h",
      "accessibility/partial_magnification_controller.cc",
      "accessibility/partial_magnification_controller.h",
      "cast_display_util.cc",
      "cast_display_util.h",
      "cast_focus_client_aura.cc",
      "cast_focus_client_aura.h",
      "cast_touch_event_gate.cc",
      "cast_touch_event_gate.h",
      "cast_window_manager_aura.cc",
      "cast_window_manager_aura.h",
      "cast_window_tree_host_aura.cc",
      "cast_window_tree_host_aura.h",
      "gestures/cast_system_gesture_dispatcher.cc",
      "gestures/cast_system_gesture_dispatcher.h",
      "gestures/cast_system_gesture_event_handler.cc",
      "gestures/cast_system_gesture_event_handler.h",
      "gestures/multiple_tap_detector.cc",
      "gestures/multiple_tap_detector.h",
      "gestures/side_swipe_detector.cc",
      "gestures/side_swipe_detector.h",
      "rounded_window_corners_aura.cc",
    ]

    deps += [
      "//chromecast:chromecast_buildflags",
      "//components/viz/common",
      "//ui/base/ime/init",
      "//ui/events:gesture_detection",
      "//ui/views",
      "//ui/wm",
      "//ui/wm/public",
    ]
  } else {
    sources += [
      "cast_window_manager_default.cc",
      "cast_window_manager_default.h",
      "rounded_window_corners_default.cc",
    ]
  }

  if (use_aura) {
    sources += [
      "cast_screen.cc",
      "cast_screen.h",
    ]

    deps += [
      ":libcast_graphics_1.0",
      "//chromecast/base",
      "//chromecast/public",
      "//skia",
      "//ui/aura",
      "//ui/compositor",
      "//ui/display",
      "//ui/gfx/geometry",
      "//ui/platform_window",
    ]
  }

  if (use_ozone) {
    deps += [ "//ui/ozone" ]
  }
}

cast_shared_library("libcast_graphics_1.0") {
  sources = [
    "cast_egl_platform_default.cc",
    "graphics_properties_default.cc",
    "osd_plane_default.cc",
  ]

  public_deps = [ "//chromecast/public" ]

  deps = [
    "//base",
    "//chromecast/base:chromecast_switches",
    "//chromecast/base:init_shlib",
  ]
}

if (use_aura && !is_cast_audio_only) {
  test("cast_graphics_unittests") {
    sources = [
      "accessibility/accessibility_focus_ring_controller_unittest.cc",
      "accessibility/partial_magnification_controller_unittest.cc",
      "cast_display_util_unittest.cc",
      "cast_focus_client_aura_test.cc",
      "cast_screen_unittest.cc",
      "cast_touch_event_gate_test.cc",
      "cast_views_test.cc",
      "cast_window_manager_aura_test.cc",
      "gestures/cast_system_gesture_dispatcher_test.cc",
      "gestures/multiple_tap_detector_test.cc",
      "gestures/side_swipe_detector_test.cc",
      "run_all_unittests.cc",
    ]
    deps = [
      ":graphics",
      "//base/test:test_support",
      "//mojo/core/embedder",
      "//testing/gmock",
      "//testing/gtest",
      "//ui/aura",
      "//ui/aura:test_support",
      "//ui/base:test_support",
      "//ui/display/manager:manager",
      "//ui/events:test_support",
      "//ui/gfx",
      "//ui/gl:test_support",
      "//ui/platform_window",
      "//ui/views",
      "//ui/views:test_support",
      "//ui/wm",
    ]
  }
}