Commit 5e4c24b9 authored by Brett Wilson's avatar Brett Wilson

Fix most of the "gn check" errors in ui/*

Some errors remain but these are circular includes that can't be fixed in the build files only.

Enable views_unittests and wm_unittests now that they compile

BUG=
R=sky@chromium.org, tfarina@chromium.org

Review URL: https://codereview.chromium.org/513313002

Cr-Commit-Position: refs/heads/master@{#292445}
parent e5f75e0d
...@@ -15,8 +15,6 @@ group("browser") { ...@@ -15,8 +15,6 @@ group("browser") {
} }
source_set("sources") { source_set("sources") {
visibility = [ "//content", ":browser" ]
if (is_ios) { if (is_ios) {
# iOS doesn't get the normal file list and only takes these whitelisted # iOS doesn't get the normal file list and only takes these whitelisted
# files. # files.
......
...@@ -48,6 +48,7 @@ component("app_list") { ...@@ -48,6 +48,7 @@ component("app_list") {
"//base:i18n", "//base:i18n",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//skia", "//skia",
"//ui/accessibility",
"//ui/base", "//ui/base",
"//ui/compositor", "//ui/compositor",
"//ui/events:events_base", "//ui/events:events_base",
...@@ -195,6 +196,8 @@ test("app_list_unittests") { ...@@ -195,6 +196,8 @@ test("app_list_unittests") {
"//testing/gtest", "//testing/gtest",
"//ui/base", "//ui/base",
"//ui/compositor", "//ui/compositor",
"//ui/events",
"//ui/gl",
"//ui/resources", "//ui/resources",
"//ui/resources:ui_test_pak", "//ui/resources:ui_test_pak",
] ]
......
...@@ -225,6 +225,7 @@ executable("demo") { ...@@ -225,6 +225,7 @@ executable("demo") {
"//ui/events", "//ui/events",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/gl",
] ]
if (use_x11) { if (use_x11) {
...@@ -254,6 +255,7 @@ executable("bench") { ...@@ -254,6 +255,7 @@ executable("bench") {
"//ui/events", "//ui/events",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/gl",
] ]
if (use_x11) { if (use_x11) {
......
...@@ -558,6 +558,7 @@ source_set("test_support") { ...@@ -558,6 +558,7 @@ source_set("test_support") {
] ]
deps = [ deps = [
":base",
"//base", "//base",
"//skia", "//skia",
"//testing/gtest", "//testing/gtest",
......
...@@ -7,6 +7,7 @@ import("//build/config/ui.gni") ...@@ -7,6 +7,7 @@ import("//build/config/ui.gni")
source_set("ime") { source_set("ime") {
# GYP version: ui/base/ime/ime.gypi, which is included into ui_base # GYP version: ui/base/ime/ime.gypi, which is included into ui_base
sources = [ sources = [
"../ui_base_export.h",
"candidate_window.cc", "candidate_window.cc",
"candidate_window.h", "candidate_window.h",
"chromeos/character_composer.cc", "chromeos/character_composer.cc",
......
...@@ -58,6 +58,7 @@ component("compositor") { ...@@ -58,6 +58,7 @@ component("compositor") {
"//base", "//base",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//cc", "//cc",
"//cc/surfaces",
"//gpu/command_buffer/common", "//gpu/command_buffer/common",
"//skia", "//skia",
"//ui/gfx", "//ui/gfx",
......
...@@ -72,18 +72,6 @@ component("events_base") { ...@@ -72,18 +72,6 @@ component("events_base") {
} }
component("events") { component("events") {
deps = [
":dom4_keycode_converter",
":events_base",
":gesture_detection",
"//base/third_party/dynamic_annotations",
"//skia",
"//ui/gfx",
"//ui/gfx/geometry",
]
defines = [ "EVENTS_IMPLEMENTATION" ]
sources = [ sources = [
"cocoa/cocoa_event_utils.h", "cocoa/cocoa_event_utils.h",
"cocoa/cocoa_event_utils.mm", "cocoa/cocoa_event_utils.mm",
...@@ -114,6 +102,20 @@ component("events") { ...@@ -114,6 +102,20 @@ component("events") {
"x/events_x.cc", "x/events_x.cc",
] ]
defines = [ "EVENTS_IMPLEMENTATION" ]
deps = [
":dom4_keycode_converter",
":events_base",
":gesture_detection",
"//base/third_party/dynamic_annotations",
"//skia",
"//ui/gfx",
"//ui/gfx/geometry",
]
forward_dependent_configs_from = [ ":events_base" ]
if (use_x11) { if (use_x11) {
configs += [ configs += [
"//build/config/linux:glib", "//build/config/linux:glib",
...@@ -231,13 +233,13 @@ source_set("test_support") { ...@@ -231,13 +233,13 @@ source_set("test_support") {
] ]
deps = [ deps = [
":events",
":events_base",
":gesture_detection",
"//base", "//base",
"//skia", "//skia",
"//ui/events/platform", "//ui/events/platform",
"//ui/gfx/geometry", "//ui/gfx/geometry",
":events",
":events_base",
":gesture_detection",
] ]
if (is_ios) { if (is_ios) {
......
...@@ -13,6 +13,9 @@ component("ipc") { ...@@ -13,6 +13,9 @@ component("ipc") {
defines = [ "EVENTS_IMPLEMENTATION" ] defines = [ "EVENTS_IMPLEMENTATION" ]
deps = [ "//ipc" ] deps = [
"//ipc",
"//ui/events",
]
} }
...@@ -6,6 +6,9 @@ import("//build/config/ui.gni") ...@@ -6,6 +6,9 @@ import("//build/config/ui.gni")
component("platform") { component("platform") {
sources = [ sources = [
# Allow this target to include events_export.h without depending on the
# events target (which would be circular).
"../events_export.h",
"platform_event_dispatcher.h", "platform_event_dispatcher.h",
"platform_event_observer.h", "platform_event_observer.h",
"platform_event_source.cc", "platform_event_source.cc",
...@@ -21,7 +24,7 @@ component("platform") { ...@@ -21,7 +24,7 @@ component("platform") {
] ]
deps = [ deps = [
"//base" "//base",
] ]
if (use_x11) { if (use_x11) {
......
...@@ -7,6 +7,7 @@ component("x") { ...@@ -7,6 +7,7 @@ component("x") {
output_name = "gfx_x11" output_name = "gfx_x11"
sources = [ sources = [
"../gfx_export.h",
"x11_atom_cache.cc", "x11_atom_cache.cc",
"x11_atom_cache.h", "x11_atom_cache.h",
"x11_connection.cc", "x11_connection.cc",
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import("//build/config/ui.gni") import("//build/config/ui.gni")
if (is_android) { if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
} }
...@@ -246,15 +247,14 @@ component("gl") { ...@@ -246,15 +247,14 @@ component("gl") {
"gl_surface_ozone.cc", "gl_surface_ozone.cc",
] ]
deps += [ deps += [
#"//ui/gfx/ozone",
"//ui/ozone", "//ui/ozone",
"//ui/ozone:ozone_base",
] ]
} }
# TODO(GYP) enable this dependency once its written. if (is_android && !is_android_webview_build) {
#if (is_android && !android_webview_build) { deps += [ "//ui/android:ui_java" ]
# deps += [ "//ui/android:ui_java" ] }
#}
} }
action("generate_gl_bindings") { action("generate_gl_bindings") {
......
...@@ -91,6 +91,7 @@ test("keyboard_unittests") { ...@@ -91,6 +91,7 @@ test("keyboard_unittests") {
"//ui/compositor:test_support", "//ui/compositor:test_support",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/gl",
"//ui/resources:ui_test_pak", "//ui/resources:ui_test_pak",
"//ui/wm", "//ui/wm",
"//url", "//url",
......
...@@ -16,6 +16,7 @@ source_set("webui") { ...@@ -16,6 +16,7 @@ source_set("webui") {
visibility = "//ui/keyboard" visibility = "//ui/keyboard"
sources = [ sources = [
"../keyboard_export.h",
"vk_mojo_handler.cc", "vk_mojo_handler.cc",
"vk_mojo_handler.h", "vk_mojo_handler.h",
"vk_webui_controller.cc", "vk_webui_controller.cc",
...@@ -26,6 +27,7 @@ source_set("webui") { ...@@ -26,6 +27,7 @@ source_set("webui") {
":mojo_bindings", ":mojo_bindings",
"//base", "//base",
"//content/public/browser", "//content/public/browser",
"//content/public/common",
"//ui/aura", "//ui/aura",
"//ui/base", "//ui/base",
"//ui/keyboard:resources", "//ui/keyboard:resources",
......
...@@ -13,7 +13,9 @@ component("message_center") { ...@@ -13,7 +13,9 @@ component("message_center") {
"//base:i18n", "//base:i18n",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//skia", "//skia",
"//ui/accessibility",
"//ui/base", "//ui/base",
"//ui/events",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/resources", "//ui/resources",
...@@ -178,8 +180,10 @@ test("message_center_unittests") { ...@@ -178,8 +180,10 @@ test("message_center_unittests") {
"//skia", "//skia",
"//testing/gtest", "//testing/gtest",
"//ui/base", "//ui/base",
"//ui/events",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/gl",
"//ui/resources", "//ui/resources",
"//ui/resources:ui_test_pak", "//ui/resources:ui_test_pak",
"//url", "//url",
......
...@@ -10,4 +10,10 @@ component("platform_window") { ...@@ -10,4 +10,10 @@ component("platform_window") {
"platform_window_delegate.h", "platform_window_delegate.h",
"platform_window_export.h", "platform_window_export.h",
] ]
deps = [
"//base",
"//ui/base",
"//ui/gfx",
]
} }
...@@ -69,6 +69,7 @@ test("snapshot_unittests") { ...@@ -69,6 +69,7 @@ test("snapshot_unittests") {
"//ui/base", "//ui/base",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/gl",
] ]
if (use_aura) { if (use_aura) {
......
...@@ -117,6 +117,7 @@ static_library("test_support") { ...@@ -117,6 +117,7 @@ static_library("test_support") {
"//ui/compositor", "//ui/compositor",
"//ui/compositor:test_support", "//ui/compositor:test_support",
"//ui/events", "//ui/events",
"//ui/events:events_base",
"//ui/events/platform", "//ui/events/platform",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
...@@ -135,8 +136,6 @@ static_library("test_support") { ...@@ -135,8 +136,6 @@ static_library("test_support") {
} }
} }
if (false) { # TODO(GYP) enable once this links
test("views_unittests") { test("views_unittests") {
sources = gypi_values.views_unittests_sources sources = gypi_values.views_unittests_sources
...@@ -160,6 +159,7 @@ test("views_unittests") { ...@@ -160,6 +159,7 @@ test("views_unittests") {
"//ui/events/platform", "//ui/events/platform",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/gl",
"//ui/wm", "//ui/wm",
"//url", "//url",
] ]
...@@ -201,14 +201,9 @@ test("views_unittests") { ...@@ -201,14 +201,9 @@ test("views_unittests") {
] ]
} }
if (use_ozone) {
sources -= [
"corewm/capture_controller_unittest.cc",
]
}
if (use_aura) { if (use_aura) {
sources += gypi_values.views_unittests_aura_sources sources += gypi_values.views_unittests_aura_sources
deps = [ "//ui/aura:test_support" ] deps += [ "//ui/aura:test_support" ]
if (!is_chromeos) { if (!is_chromeos) {
sources += gypi_values.views_unittests_desktop_aura_sources sources += gypi_values.views_unittests_desktop_aura_sources
} }
...@@ -255,5 +250,3 @@ if (is_mac) { ...@@ -255,5 +250,3 @@ if (is_mac) {
] ]
} }
} }
} # if false
...@@ -23,8 +23,10 @@ component("webview") { ...@@ -23,8 +23,10 @@ component("webview") {
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//content/public/browser", "//content/public/browser",
"//skia", "//skia",
"//ui/accessibility",
"//ui/base", "//ui/base",
"//ui/events", "//ui/events",
"//ui/events:events_base",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/web_dialogs", "//ui/web_dialogs",
...@@ -47,6 +49,7 @@ source_set("test_support") { ...@@ -47,6 +49,7 @@ source_set("test_support") {
":webview", ":webview",
"//base", "//base",
"//content", "//content",
"//content/test:test_support",
"//ipc:test_support", "//ipc:test_support",
"//skia", "//skia",
"//testing/gtest", "//testing/gtest",
...@@ -57,6 +60,5 @@ source_set("test_support") { ...@@ -57,6 +60,5 @@ source_set("test_support") {
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/views", "//ui/views",
"//ui/views:test_support", "//ui/views:test_support",
#'../../../../content/content_shell_and_tests.gyp:test_support_content', TODO(GYP)
] ]
} }
...@@ -19,7 +19,9 @@ component("web_dialogs") { ...@@ -19,7 +19,9 @@ component("web_dialogs") {
"//base", "//base",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//content/public/browser", "//content/public/browser",
"//content/public/common",
"//skia", "//skia",
"//ui/base",
] ]
} }
......
...@@ -96,18 +96,16 @@ static_library("test_support") { ...@@ -96,18 +96,16 @@ static_library("test_support") {
] ]
deps = [ deps = [
":wm",
"//skia", "//skia",
"//ui/aura", "//ui/aura",
"//ui/aura:test_support",
"//ui/base", "//ui/base",
"//ui/events", "//ui/events",
"//ui/events:events_base", "//ui/events:events_base",
] ]
} }
# TODO(GYP) enable the wm_unittests target when all dependencies have been
# resolved. Some transitive deps aren't converted yet.
if (false) {
test("wm_unittests") { test("wm_unittests") {
sources = [ sources = [
"test/run_all_unittests.cc", "test/run_all_unittests.cc",
...@@ -141,7 +139,6 @@ test("wm_unittests") { ...@@ -141,7 +139,6 @@ test("wm_unittests") {
"//ui/events/platform", "//ui/events/platform",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/gl",
] ]
} }
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment