0

Add most of //ui/ to "gn check"

Fixes various missing dependencies.

In static builds, the //content target now exports content/public/browser, etc. as public dependencies.

Add an ipc_param_traits target that allows targets like events/latency_info.h to define IPC traits, without actually linking in all of IPC (because in this case events has no use of IPC).

Move some targets to public deps. The rule is that test_support targets should export the corresponding regular target as a public dep so tests don't have to depend on both.

Mark a few conditional includes "// nogncheck" where the checker got confused.

Fix manifest for views_unittests

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

Cr-Commit-Position: refs/heads/master@{#363690}
This commit is contained in:
brettw
2015-12-07 17:29:21 -08:00
committed by Commit bot
parent 6a1950a5a0
commit b7f2c30e4c
27 changed files with 98 additions and 33 deletions
.gn
content
ipc
ui
accessibility
android
app_list
aura
base
chromeos
compositor
events
gfx
gl
keyboard
metro_viewer
mojo
platform_window
views
wm

35
.gn

@ -80,7 +80,40 @@ check_targets = [
"//third_party/WebKit/Source/*",
"//tools/*",
#"//ui/*", # Just a few problems.
#"//ui/*", # Work left on Chromeos w/ use_ozone. Some parts of UI that work:
"//ui/accessibility/*",
"//ui/android/*",
"//ui/app_list/*",
"//ui/aura/*",
"//ui/aura_extra/*",
"//ui/base/*",
"//ui/chromeos/*",
"//ui/compositor/*",
"//ui/display/*",
"//ui/events:events", # Specifically avoid //ui/events/ozone
"//ui/events:events_base",
"//ui/events:events_unittests",
"//ui/file_manager/*",
"//ui/gfx/*",
"//ui/gl/*",
"//ui/keyboard/*",
"//ui/login/*",
"//ui/message_center/*",
"//ui/metro_viewer/*",
"//ui/mojo/*",
"//ui/native_theme/*",
"//ui/platform_window/*",
"//ui/resources/*",
"//ui/shell_dialogs/*",
"//ui/snapshot/*",
"//ui/strings/*",
"//ui/surface/*",
"//ui/touch_selection/*",
"//ui/views/*",
"//ui/views_content_client/*",
"//ui/web_dialogs/*",
"//ui/webui/*",
"//ui/wm/*",
"//url/*",
"//v8/*",
"//win8/*",

@ -82,7 +82,7 @@ if (is_component_build) {
}
} else {
group("content") {
deps = content_shared_components
public_deps = content_shared_components
}
}

@ -67,7 +67,6 @@ component("ipc") {
"ipc_message_start.h",
"ipc_message_utils.cc",
"ipc_message_utils.h",
"ipc_param_traits.h",
"ipc_platform_file.cc",
"ipc_platform_file.h",
"ipc_platform_file_attachment_posix.cc",
@ -120,6 +119,9 @@ component("ipc") {
defines = [ "IPC_IMPLEMENTATION" ]
public_deps = [
":param_traits",
]
deps = [
"//base",
@ -134,6 +136,14 @@ component("ipc") {
}
}
# This is provided as a separate target so other targets can provide param
# traits implementations without necessarily linking to all of IPC.
source_set("param_traits") {
public = [
"ipc_param_traits.h",
]
}
group("ipc_tests_run") {
testonly = true
deps = [
@ -239,8 +249,10 @@ source_set("test_support") {
"test_util_mac.cc",
"test_util_mac.h",
]
deps = [
public_deps = [
":ipc",
]
deps = [
"//base",
"//base/test:test_support",
"//testing/gtest",

@ -74,6 +74,7 @@ component("accessibility") {
public_deps = [
":ax_gen",
"//base",
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
]
@ -149,6 +150,7 @@ test("accessibility_unittests") {
"//base",
"//base/test:run_all_unittests",
"//testing/gtest",
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
]

@ -42,6 +42,7 @@ component("android") {
defines = [ "UI_ANDROID_IMPLEMENTATION" ]
deps = [
":java_enums_srcjar",
":ui_android_jni_headers",
"//base",
"//cc",
@ -157,6 +158,7 @@ test("ui_android_unittests") {
]
deps = [
":android",
":java_enums_srcjar",
":ui_java",
"//base",
"//base/test:test_support",

@ -307,9 +307,9 @@ test("app_list_unittests") {
"//testing/gtest",
"//ui/base",
"//ui/compositor",
"//ui/events",
"//ui/events:test_support",
"//ui/gl",
"//ui/gfx:test_support",
"//ui/gl:test_support",
"//ui/resources",
"//ui/resources:ui_test_pak",
]

@ -109,6 +109,7 @@ component("aura") {
"//ui/events/platform",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/platform_window",
]
if (use_x11) {
@ -312,7 +313,7 @@ test("aura_unittests") {
"//ui/events:test_support",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gl",
"//ui/gl:test_support",
]
if (is_linux) {

@ -618,9 +618,11 @@ source_set("test_support") {
]
deps = [
"//base",
"//base/test:test_config",
"//skia",
"//testing/gtest",
"//ui/events:events_base",
"//ui/events:test_support",
"//ui/gfx",
"//ui/gfx/geometry",
]

@ -86,7 +86,7 @@ test("ui_chromeos_unittests") {
"//ui/aura:test_support",
"//ui/compositor",
"//ui/events:test_support",
"//ui/gl",
"//ui/gl:test_support",
"//ui/message_center",
"//ui/resources:ui_test_pak",
"//ui/views",

@ -144,7 +144,7 @@ source_set("test_support") {
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gl",
"//ui/gl:test_support",
]
if (use_x11) {

@ -58,6 +58,7 @@ component("events_base") {
deps = [
":dom_keycode_converter",
"//base/third_party/dynamic_annotations",
"//ipc:param_traits",
"//skia",
]
@ -289,6 +290,7 @@ source_set("test_support") {
":events",
":events_base",
":gesture_detection",
"//ui/events/devices",
]
deps = [
"//base",
@ -368,6 +370,7 @@ test("events_unittests") {
"//base/test:run_all_unittests",
"//ipc:test_support",
"//skia",
"//testing/gmock",
"//testing/gtest",
"//ui/events/devices",
"//ui/events/ipc:events_ipc",
@ -382,6 +385,7 @@ test("events_unittests") {
"gestures/blink/web_gesture_curve_impl_unittest.cc",
]
deps += [
"//cc",
"//third_party/WebKit/public:blink_headers",
"//ui/events/blink",
"//ui/events/gestures/blink",

@ -30,8 +30,8 @@
#if defined(USE_X11)
#include "ui/events/keycodes/keyboard_code_conversion_x.h"
#elif defined(USE_OZONE)
#include "ui/events/ozone/layout/keyboard_layout_engine.h"
#include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
#include "ui/events/ozone/layout/keyboard_layout_engine.h" // nogncheck
#include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" // nogncheck
#endif
namespace {

@ -7,7 +7,6 @@
#include <algorithm>
#include "base/strings/string16.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/keyboard_code_conversion.h"

@ -427,7 +427,6 @@ component("gfx") {
action("aggregate_vector_icons") {
script = "vector_icons/aggregate_vector_icons.py"
sources = [
"vector_icon_types.h",
"vector_icons/account_box.icon",
"vector_icons/account_child_invert.icon",
"vector_icons/apps.icon",

@ -288,6 +288,7 @@ source_set("gl_unittest_utils") {
deps = [
":gl",
"//testing/gmock",
"//testing/gtest",
]
}
@ -305,8 +306,10 @@ source_set("test_support") {
configs += [ "//third_party/khronos:khronos_headers" ]
deps = [
public_deps = [
":gl",
]
deps = [
"//testing/gtest",
]

@ -148,7 +148,7 @@ test("keyboard_unittests") {
"//ui/events:test_support",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gl",
"//ui/gl:test_support",
"//ui/wm",
]
}

@ -14,5 +14,6 @@ source_set("metro_viewer") {
deps = [
"//base",
"//ipc",
"//ui/events",
]
}

@ -14,4 +14,8 @@ source_set("util") {
sources = [
"geometry_util.h",
]
deps = [
":interfaces",
]
}

@ -12,13 +12,11 @@ source_set("init") {
deps = [
"//base",
"//ui/gfx",
"//ui/gfx/geometry",
]
if (is_android) {
deps += [
"//ui/events:gesture_detection",
"//ui/gfx",
]
deps += [ "//ui/events:gesture_detection" ]
}
}

@ -8,7 +8,7 @@
#include "ui/mojo/init/screen_mojo.h"
#if defined(OS_ANDROID)
#include "ui/events/gesture_detection/gesture_configuration.h"
#include "ui/events/gesture_detection/gesture_configuration.h" // nogncheck
#endif
namespace ui {

@ -16,6 +16,7 @@ source_set("platform_window") {
deps = [
"//base",
"//ui/base",
"//ui/base/ime",
"//ui/gfx",
]
}

@ -28,6 +28,7 @@ component("android") {
"//ui/events:events_base",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/platform_window",
]
libs = [ "android" ]

@ -7,6 +7,7 @@ component("stub") {
deps = [
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/platform_window",
]

@ -133,7 +133,10 @@ component("views") {
}
if (is_mac) {
deps += [ "//ui/accelerated_widget_mac" ]
deps += [
"//ui/accelerated_widget_mac",
"//ui/events:dom_keycode_converter",
]
libs = [
# Required by bridged_native_widget.mm.
"QuartzCore.framework",
@ -195,6 +198,7 @@ test("views_unittests") {
"//base:i18n",
"//base/allocator",
"//base/test:test_support",
"//cc",
"//skia",
"//testing/gtest",
"//third_party/icu",
@ -203,12 +207,13 @@ test("views_unittests") {
"//ui/base:test_support",
"//ui/base/ime",
"//ui/compositor:test_support",
"//ui/events:dom_keycode_converter",
"//ui/events:events_base",
"//ui/events:test_support",
"//ui/events/platform",
"//ui/gfx",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
"//ui/gl",
"//ui/gl:test_support",
"//ui/resources",
"//ui/strings",
"//url",
@ -220,6 +225,7 @@ test("views_unittests") {
if (is_win) {
deps += [
"//build/win:default_exe_manifest",
"//third_party/iaccessible2",
"//third_party/wtl",
]
@ -228,15 +234,6 @@ test("views_unittests") {
"oleacc.lib",
"comctl32.lib",
]
# TOOD(GYP)
#'msvs_settings': {
# 'VCManifestTool': {
# 'AdditionalManifestFiles': [
# '$(ProjectDir)\\test\\views_unittest.manifest',
# ],
# },
#},
}
if (use_x11) {
@ -303,6 +300,8 @@ if (is_mac) {
"//testing/gtest",
"//ui/base:test_support",
"//ui/compositor",
"//ui/events:test_support",
"//ui/gl:test_support",
"//ui/resources",
"//ui/resources:ui_test_pak",
"//ui/strings",

@ -163,6 +163,7 @@ executable("views_examples_with_content_exe") {
"//build/config/sanitizers:deps",
"//content",
"//content:sandbox_helper_win",
"//sandbox",
"//ui/views_content_client",
]

@ -73,6 +73,7 @@ component("mus") {
"//ui/mojo/ime:interfaces_cpp_sources",
"//ui/mojo/init",
"//ui/native_theme",
"//ui/platform_window",
"//ui/views",
"//ui/wm",
]

@ -166,7 +166,8 @@ test("wm_unittests") {
"//ui/events/platform",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gl",
"//ui/gl:test_support",
"//ui/resources",
]
data_deps = [