mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
233 lines
6.0 KiB
Plaintext
233 lines
6.0 KiB
Plaintext
|
# 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/ui.gni")
|
||
|
import("//ui/ozone/ozone.gni")
|
||
|
import("//ui/ozone/ozone_extra.gni")
|
||
|
import("//testing/test.gni")
|
||
|
|
||
|
assert(use_ozone)
|
||
|
|
||
|
visibility = [ ":*" ]
|
||
|
|
||
|
# The list of platforms that will be built.
|
||
|
ozone_platforms = ozone_external_platforms
|
||
|
|
||
|
# Extra dependencies to pull into ui/ozone for built platforms.
|
||
|
ozone_platform_deps = ozone_external_platform_deps
|
||
|
|
||
|
# Extra dependencies to pull into ozone_unittests for built platforms.
|
||
|
ozone_platform_test_deps = ozone_external_platform_test_deps
|
||
|
|
||
|
if (ozone_platform_headless) {
|
||
|
ozone_platforms += [ "headless" ]
|
||
|
ozone_platform_deps += [ "platform/headless" ]
|
||
|
}
|
||
|
|
||
|
if (ozone_platform_gbm) {
|
||
|
ozone_platforms += [ "gbm" ]
|
||
|
ozone_platform_deps += [ "platform/drm:gbm" ]
|
||
|
ozone_platform_test_deps += [ "platform/drm:gbm_unittests" ]
|
||
|
}
|
||
|
|
||
|
if (ozone_platform_cast) {
|
||
|
ozone_platforms += [ "cast" ]
|
||
|
ozone_platform_deps += [ "platform/cast" ]
|
||
|
}
|
||
|
|
||
|
if (ozone_platform_wayland) {
|
||
|
ozone_platforms += [ "wayland" ]
|
||
|
ozone_platform_deps += [ "platform/wayland" ]
|
||
|
ozone_platform_test_deps += [ "platform/wayland:wayland_unittests" ]
|
||
|
}
|
||
|
|
||
|
if (ozone_platform_x11) {
|
||
|
ozone_platforms += [ "x11" ]
|
||
|
ozone_platform_deps += [ "platform/x11" ]
|
||
|
}
|
||
|
|
||
|
platform_list_cc_file = "$target_gen_dir/platform_list.cc"
|
||
|
platform_list_h_file = "$target_gen_dir/platform_list.h"
|
||
|
platform_list_txt_file = "$target_gen_dir/platform_list.txt"
|
||
|
constructor_list_cc_file = "$target_gen_dir/constructor_list.cc"
|
||
|
|
||
|
component("ozone_base") {
|
||
|
sources = [
|
||
|
"ozone_base_export.h",
|
||
|
"public/cursor_factory_ozone.cc",
|
||
|
"public/cursor_factory_ozone.h",
|
||
|
"public/gl_ozone.h",
|
||
|
"public/gpu_platform_support_host.cc",
|
||
|
"public/gpu_platform_support_host.h",
|
||
|
"public/input_controller.cc",
|
||
|
"public/input_controller.h",
|
||
|
"public/overlay_candidates_ozone.cc",
|
||
|
"public/overlay_candidates_ozone.h",
|
||
|
"public/overlay_manager_ozone.h",
|
||
|
"public/overlay_surface_candidate.cc",
|
||
|
"public/overlay_surface_candidate.h",
|
||
|
"public/ozone_switches.cc",
|
||
|
"public/ozone_switches.h",
|
||
|
"public/surface_factory_ozone.cc",
|
||
|
"public/surface_factory_ozone.h",
|
||
|
"public/surface_ozone_canvas.h",
|
||
|
"public/swap_completion_callback.h",
|
||
|
]
|
||
|
|
||
|
defines = [ "OZONE_BASE_IMPLEMENTATION" ]
|
||
|
|
||
|
public_deps = [
|
||
|
"//base",
|
||
|
"//ipc",
|
||
|
"//skia",
|
||
|
"//ui/display/types",
|
||
|
"//ui/display/util",
|
||
|
"//ui/events",
|
||
|
"//ui/events:dom_keycode_converter",
|
||
|
"//ui/gfx",
|
||
|
"//ui/gfx/geometry",
|
||
|
"//ui/gfx/ipc",
|
||
|
"//ui/gfx/ipc/geometry",
|
||
|
"//ui/gfx/ipc/skia",
|
||
|
"//ui/gl",
|
||
|
]
|
||
|
|
||
|
visibility += [
|
||
|
# Everyone should depend on //ui/ozone instead except a handful of
|
||
|
# things that would otherwise create a cycle.
|
||
|
"//ui/base",
|
||
|
"//ui/events/ozone/*",
|
||
|
"//ui/ozone/common/*",
|
||
|
"//ui/ozone/public/interfaces",
|
||
|
"//ui/ozone/platform/*",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
source_set("platform") {
|
||
|
sources = [
|
||
|
"common/stub_client_native_pixmap_factory.cc",
|
||
|
"common/stub_client_native_pixmap_factory.h",
|
||
|
"ozone_export.h",
|
||
|
"platform_constructor_list.h",
|
||
|
"platform_object.h",
|
||
|
"platform_object_internal.h",
|
||
|
"platform_selection.cc",
|
||
|
"platform_selection.h",
|
||
|
"public/client_native_pixmap_factory_ozone.cc",
|
||
|
"public/ozone_gpu_test_helper.cc",
|
||
|
"public/ozone_platform.cc",
|
||
|
constructor_list_cc_file,
|
||
|
platform_list_cc_file,
|
||
|
platform_list_h_file,
|
||
|
]
|
||
|
|
||
|
public = [
|
||
|
"public/client_native_pixmap_factory_ozone.h",
|
||
|
"public/ozone_gpu_test_helper.h",
|
||
|
"public/ozone_platform.h",
|
||
|
]
|
||
|
|
||
|
defines = [ "OZONE_IMPLEMENTATION" ]
|
||
|
|
||
|
public_deps = [
|
||
|
":ozone_base",
|
||
|
"//base",
|
||
|
"//ipc",
|
||
|
"//services/service_manager/public/cpp",
|
||
|
"//skia",
|
||
|
"//ui/display/types",
|
||
|
"//ui/events",
|
||
|
"//ui/events/devices",
|
||
|
"//ui/gfx",
|
||
|
"//ui/gfx/geometry",
|
||
|
"//ui/platform_window",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":generate_constructor_list",
|
||
|
":generate_ozone_platform_list",
|
||
|
]
|
||
|
|
||
|
deps += ozone_platform_deps
|
||
|
|
||
|
# Platforms are always linked into //ui/ozone and can include our headers.
|
||
|
allow_circular_includes_from = ozone_platform_deps
|
||
|
|
||
|
# This is used for platform tests.
|
||
|
visibility += [ "//ui/ozone/platform/*" ]
|
||
|
}
|
||
|
|
||
|
component("ozone") {
|
||
|
visibility = []
|
||
|
visibility = [ "*" ]
|
||
|
public_deps = [
|
||
|
":platform",
|
||
|
"//ui/ozone/public/interfaces",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
action("generate_ozone_platform_list") {
|
||
|
script = "generate_ozone_platform_list.py"
|
||
|
outputs = [
|
||
|
platform_list_cc_file,
|
||
|
platform_list_h_file,
|
||
|
platform_list_txt_file,
|
||
|
]
|
||
|
|
||
|
args =
|
||
|
[
|
||
|
"--output_cc=" + rebase_path(platform_list_cc_file, root_build_dir),
|
||
|
"--output_h=" + rebase_path(platform_list_h_file, root_build_dir),
|
||
|
"--output_txt=" + rebase_path(platform_list_txt_file, root_build_dir),
|
||
|
"--default=$ozone_platform",
|
||
|
] + ozone_platforms
|
||
|
|
||
|
visibility += [ "//media:*" ]
|
||
|
}
|
||
|
|
||
|
action("generate_constructor_list") {
|
||
|
script = "generate_constructor_list.py"
|
||
|
|
||
|
inputs = [
|
||
|
platform_list_txt_file,
|
||
|
]
|
||
|
outputs = [
|
||
|
constructor_list_cc_file,
|
||
|
]
|
||
|
|
||
|
args = [
|
||
|
"--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir),
|
||
|
"--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir),
|
||
|
"--namespace=ui",
|
||
|
"--typename=OzonePlatform",
|
||
|
"--typename=ClientNativePixmapFactory",
|
||
|
"--using=gfx::ClientNativePixmapFactory",
|
||
|
"--include=\"ui/gfx/client_native_pixmap_factory.h\"",
|
||
|
"--include=\"ui/ozone/public/ozone_platform.h\"",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":generate_ozone_platform_list",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
test("ozone_unittests") {
|
||
|
deps = [
|
||
|
"//base/test:test_support",
|
||
|
"//mojo/edk/test:run_all_unittests",
|
||
|
"//mojo/public/cpp/bindings",
|
||
|
"//testing/gtest",
|
||
|
"//ui/gfx:test_support",
|
||
|
"//ui/gfx/geometry",
|
||
|
"//ui/ozone/public/interfaces:struct_trait_unit_test",
|
||
|
]
|
||
|
|
||
|
# Add tests of platform internals.
|
||
|
deps += ozone_platform_test_deps
|
||
|
|
||
|
# Platform tests link ozone statically. Make sure we're not getting a
|
||
|
# 2nd copy of any code via the component.
|
||
|
assert_no_deps = [ "//ui/ozone" ]
|
||
|
}
|