Remove unused parameter.
[chromium-blink-merge.git] / ui / ozone / BUILD.gn
blobff40d8f43968af06f31ca1612cfe3a455f8de39c
1 # Copyright 2014 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.
5 import("//ui/ozone/ozone.gni")
6 import("//testing/test.gni")
8 # The list of platforms that will be built.
9 ozone_platforms = []
11 # Extra dependencies to pull into ui/ozone for built platforms.
12 ozone_platform_deps = []
14 # Extra dependencies to pull into ozone_unittests for built platforms.
15 ozone_platform_test_deps = []
17 if (ozone_platform_egltest) {
18   ozone_platforms += [ "egltest" ]
19   ozone_platform_deps += [ "platform/egltest" ]
22 if (ozone_platform_test) {
23   ozone_platforms += [ "test" ]
24   ozone_platform_deps += [ "platform/test" ]
27 if (ozone_platform_caca) {
28   ozone_platforms += [ "caca" ]
29   ozone_platform_deps += [ "platform/caca" ]
32 if (ozone_platform_dri || ozone_platform_drm) {
33   ozone_platforms += [
34     "dri",
35     "drm",
36   ]
37   ozone_platform_deps += [ "platform/drm" ]
38   ozone_platform_test_deps += [ "platform/drm:drm_unittests" ]
41 if (ozone_platform_gbm) {
42   ozone_platforms += [ "gbm" ]
43   ozone_platform_deps += [ "platform/drm:gbm" ]
46 platform_list_cc_file = "$target_gen_dir/platform_list.cc"
47 platform_list_h_file = "$target_gen_dir/platform_list.h"
48 platform_list_txt_file = "$target_gen_dir/platform_list.txt"
49 constructor_list_cc_file = "$target_gen_dir/constructor_list.cc"
51 # GYP version: ui/ozone/ozone.gyp:ozone_base
52 component("ozone_base") {
53   sources = [
54     "public/cursor_factory_ozone.cc",
55     "public/cursor_factory_ozone.h",
56     "public/gpu_platform_support.cc",
57     "public/gpu_platform_support.h",
58     "public/gpu_platform_support_host.cc",
59     "public/gpu_platform_support_host.h",
60     "public/overlay_candidates_ozone.cc",
61     "public/overlay_candidates_ozone.h",
62     "public/surface_factory_ozone.cc",
63     "public/surface_factory_ozone.h",
64     "public/surface_ozone_canvas.h",
65     "public/surface_ozone_egl.cc",
66     "public/surface_ozone_egl.h",
67     "public/system_input_injector.h",
68   ]
70   defines = [ "OZONE_BASE_IMPLEMENTATION" ]
72   deps = [
73     "//base",
74     "//skia",
75     "//ui/gfx/geometry",
76   ]
79 component("ozone") {
80   sources = [
81     "common/display_mode_proxy.cc",
82     "common/display_mode_proxy.h",
83     "common/display_snapshot_proxy.cc",
84     "common/display_snapshot_proxy.h",
85     "common/display_util.cc",
86     "common/display_util.h",
87     "common/egl_util.cc",
88     "common/egl_util.h",
89     "common/gpu/ozone_gpu_message_generator.cc",
90     "common/gpu/ozone_gpu_message_generator.h",
91     "common/gpu/ozone_gpu_message_params.cc",
92     "common/gpu/ozone_gpu_message_params.h",
93     "common/gpu/ozone_gpu_messages.h",
94     "common/native_display_delegate_ozone.cc",
95     "common/native_display_delegate_ozone.h",
96     "platform_selection.cc",
97     "platform_selection.h",
98     "public/input_controller.cc",
99     "public/input_controller.h",
100     "public/ozone_gpu_test_helper.cc",
101     "public/ozone_gpu_test_helper.h",
102     "public/ozone_platform.cc",
103     "public/ozone_platform.h",
104     "public/ozone_switches.cc",
105     "public/ozone_switches.h",
106     constructor_list_cc_file,
107     platform_list_cc_file,
108     platform_list_h_file,
109   ]
111   defines = [ "OZONE_IMPLEMENTATION" ]
113   deps =
114       [
115         ":generate_constructor_list",
116         ":generate_ozone_platform_list",
117         ":ozone_base",
118         "//base",
119         "//ipc",
120         "//skia",
121         "//ui/display/types",
122         "//ui/display/util",
123         "//ui/events",
124         "//ui/events/ozone:events_ozone",
125         "//ui/gfx",
126         "//ui/gfx/geometry",
127         "//ui/gfx/ipc",
129         # TODO(GYP) the GYP version has a way to add additional dependencies via
130         # build flags.
131       ] + ozone_platform_deps
134 # GYP version: ui/ozone/ozone.gyp:generate_ozone_platform_list
135 action("generate_ozone_platform_list") {
136   script = "generate_ozone_platform_list.py"
137   outputs = [
138     platform_list_cc_file,
139     platform_list_h_file,
140     platform_list_txt_file,
141   ]
143   args =
144       [
145         "--output_cc=" + rebase_path(platform_list_cc_file, root_build_dir),
146         "--output_h=" + rebase_path(platform_list_h_file, root_build_dir),
147         "--output_txt=" + rebase_path(platform_list_txt_file, root_build_dir),
148         "--default=$ozone_platform",
149       ] + ozone_platforms
152 # GYP version: ui/ozone/ozone.gyp:generate_constructor_list
153 action("generate_constructor_list") {
154   script = "generate_constructor_list.py"
156   inputs = [
157     platform_list_txt_file,
158   ]
159   outputs = [
160     constructor_list_cc_file,
161   ]
163   args = [
164     "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir),
165     "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir),
166     "--namespace=ui",
167     "--typename=OzonePlatform",
168     "--include=\"ui/ozone/public/ozone_platform.h\"",
169   ]
171   deps = [
172     ":generate_ozone_platform_list",
173   ]
176 test("ozone_unittests") {
177   sources = [
178     "common/display_util_unittest.cc",
179     "run_all_unittests.cc",
180   ]
182   deps = [
183            "//base/test:test_support",
184            "//testing/gtest",
185            "//ui/gfx/geometry",
186          ] + ozone_platform_test_deps