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")
8 # The default platform for Ozone.
9 ozone_platform = "test"
12 platform_list_cc_file = "$target_gen_dir/platform_list.cc"
13 platform_list_h_file = "$target_gen_dir/platform_list.h"
14 platform_list_txt_file = "$target_gen_dir/platform_list.txt"
15 constructor_list_cc_file = "$target_gen_dir/constructor_list.cc"
17 # GYP version: ui/ozone/ozone.gyp:ozone_base
18 component("ozone_base") {
20 "public/cursor_factory_ozone.cc",
21 "public/cursor_factory_ozone.h",
22 "public/event_factory_ozone.cc",
23 "public/event_factory_ozone.h",
24 "public/gpu_platform_support.cc",
25 "public/gpu_platform_support.h",
26 "public/gpu_platform_support_host.cc",
27 "public/gpu_platform_support_host.h",
28 "public/overlay_candidates_ozone.cc",
29 "public/overlay_candidates_ozone.h",
30 "public/surface_factory_ozone.cc",
31 "public/surface_factory_ozone.h",
32 "public/surface_ozone_canvas.h",
33 "public/surface_ozone_egl.h",
36 defines = [ "OZONE_BASE_IMPLEMENTATION" ]
47 platform_list_cc_file,
49 constructor_list_cc_file,
51 # common/chromeos files are excluded automatically when building with
52 # chromeos=0, by exclusion rules in filename_rules.gypi due to the
53 # "chromeos" folder name.
54 "common/chromeos/native_display_delegate_ozone.cc",
55 "common/chromeos/native_display_delegate_ozone.h",
56 "common/chromeos/touchscreen_device_manager_ozone.cc",
57 "common/chromeos/touchscreen_device_manager_ozone.h",
58 "common/gpu/ozone_gpu_message_generator.cc",
59 "common/gpu/ozone_gpu_message_generator.h",
64 "platform_selection.cc",
65 "platform_selection.h",
68 defines = [ "OZONE_IMPLEMENTATION" ]
71 ":generate_constructor_list",
72 ":generate_ozone_platform_list",
78 "//ui/events/ozone:events_ozone",
82 # TODO(GYP) the GYP version has a way to add additional dependencies via
87 deps += [ "//ui/dusplay/types" ]
91 # TODO(GYP) implement the ozone platforms. This should check the various
92 # ozone_platform_*flags, and add deps and add to the ozone_platforms list for
96 # GYP version: ui/ozone/ozone.gyp:generate_ozone_platform_list
97 action("generate_ozone_platform_list") {
98 script = "generate_ozone_platform_list.py"
100 platform_list_cc_file,
101 platform_list_h_file,
102 platform_list_txt_file
106 "--output_cc=" + rebase_path(platform_list_cc_file, root_build_dir),
107 "--output_h=" + rebase_path(platform_list_h_file, root_build_dir),
108 "--output_txt=" + rebase_path(platform_list_txt_file, root_build_dir),
109 "--default=$ozone_platform",
114 # GYP version: ui/ozone/ozone.gyp:generate_constructor_list
115 action("generate_constructor_list") {
116 script = "generate_constructor_list.py"
119 platform_list_txt_file,
122 constructor_list_cc_file,
126 "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir),
127 "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir),
129 "--typename=OzonePlatform",
130 "--include=ui/ozone/ozone_platform.h",
133 deps = [ ":generate_ozone_platform_list" ]
136 # TODO(GYP) ozone_unittests
137 # TODO(GYP) platform_caca, dri, other test stuff.