Index: ui/views/BUILD.gn |
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn |
index 4f7f22ac0509afc91ae66f4d091cb6f416b020c6..1d3f90a0f4d47f62cab6acf5b7f5e4d9840d3627 100644 |
--- a/ui/views/BUILD.gn |
+++ b/ui/views/BUILD.gn |
@@ -11,6 +11,8 @@ config("flags") { |
defines = [ "TOOLKIT_VIEWS=1" ] |
} |
+constructor_list_cc_file = "$target_gen_dir/desktop_factory_ozone_list.cc" |
+ |
component("views") { |
all_dependent_configs = [ ":flags" ] |
sources = [ |
@@ -608,6 +610,22 @@ component("views") { |
"widget/desktop_aura/desktop_screen_ozone.cc", |
"widget/desktop_aura/desktop_window_tree_host_ozone.cc", |
] |
+ |
+ deps += [ ":generate_constructor_list" ] |
+ sources += [ constructor_list_cc_file ] |
+ if (ozone_platform_wayland) { |
+ sources += [ |
+ "widget/desktop_aura/desktop_factory_ozone_stubs.cc", |
+ "widget/desktop_aura/desktop_factory_ozone_stubs.h", |
+ "widget/desktop_aura/desktop_factory_ozone_wayland.cc", |
+ "widget/desktop_aura/desktop_factory_ozone_wayland.h", |
+ "widget/desktop_aura/desktop_screen_wayland.cc", |
+ "widget/desktop_aura/desktop_screen_wayland.h", |
+ "widget/desktop_aura/desktop_window_tree_host_wayland.cc", |
+ "widget/desktop_aura/desktop_window_tree_host_wayland.h", |
+ ] |
+ deps += [ "//third_party/wayland:wayland_client" ] |
+ } |
} |
if (is_linux) { |
sources += [ |
@@ -1015,3 +1033,20 @@ if (is_mac) { |
] |
} |
} |
+ |
+# GYP version: ui//views/views.gyp:generate_constructor_list |
+action("generate_constructor_list") { |
+ script = "../ozone/generate_constructor_list.py" |
+ outputs = [ |
+ constructor_list_cc_file, |
+ ] |
+ platform_list_txt_file = "$target_gen_dir/../ozone/platform_list.txt" |
+ |
+ args = [ |
+ "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir), |
+ "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir), |
+ "--namespace=views", |
+ "--typename=DesktopFactoryOzone", |
+ "--include=\"ui/views/widget/desktop_aura/desktop_factory_ozone.h\"", |
+ ] |
+} |