Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: ui/base/BUILD.gn

Issue 704363002: XXX test gn format everything (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/BUILD.gn ('k') | ui/compositor/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/BUILD.gn
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 0143c06f091608c28d6c30525767cbd1dc641e21..be68e43d24a406f5756521af629573445cbee05d 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -276,7 +276,7 @@ component("base") {
sources += [ "touch/touch_device_android.cc" ]
} else if (use_ozone) {
sources += [ "touch/touch_device_ozone.cc" ]
- } else if (use_aura && use_x11) {
+ } else if (use_aura && use_x11) {
sources += [ "touch/touch_device_aurax11.cc" ]
} else {
# Empty implementation for all other cases.
@@ -306,9 +306,7 @@ component("base") {
if (build_ime) {
if (!is_android) {
- deps += [
- "//ui/events",
- ]
+ deps += [ "//ui/events" ]
}
sources += [
@@ -377,7 +375,7 @@ component("base") {
"ime/win/tsf_input_scope.h",
]
- if (!use_aura || (!is_linux && !use_ozone)) {
+ if (!use_aura || !is_linux && !use_ozone) {
sources -= [
"ime/input_method_auralinux.cc",
"ime/input_method_auralinux.h",
@@ -394,9 +392,7 @@ component("base") {
}
if (is_chromeos) {
- deps += [
- "//chromeos",
- ]
+ deps += [ "//chromeos" ]
}
if (use_pango) {
@@ -417,9 +413,7 @@ component("base") {
}
if (toolkit_views) {
- deps += [
- "//ui/events",
- ]
+ deps += [ "//ui/events" ]
}
if (use_x11 && use_aura) {
@@ -434,9 +428,7 @@ component("base") {
}
if (use_aura) {
- deps += [
- "//ui/events",
- ]
+ deps += [ "//ui/events" ]
} else {
sources -= [
"cursor/cursor.cc",
@@ -458,15 +450,11 @@ component("base") {
}
if (!use_aura || !is_linux) {
- sources -= [
- "resource/resource_bundle_auralinux.cc",
- ]
+ sources -= [ "resource/resource_bundle_auralinux.cc" ]
}
if (use_aura && is_win) {
- sources -= [
- "dragdrop/drag_utils_aura.cc",
- ]
+ sources -= [ "dragdrop/drag_utils_aura.cc" ]
}
if (is_linux) {
@@ -476,7 +464,7 @@ component("base") {
]
}
- if ((is_linux && !is_chromeos) || is_chromeos) {
+ if (is_linux && !is_chromeos || is_chromeos) {
if (!toolkit_views && !use_aura) {
sources -= [
"dragdrop/drag_utils.cc",
@@ -485,7 +473,7 @@ component("base") {
}
}
- if (is_chromeos || (use_aura && is_linux && !use_x11)) {
+ if (is_chromeos || use_aura && is_linux && !use_x11) {
sources += [
"dragdrop/os_exchange_data_provider_aura.cc",
"dragdrop/os_exchange_data_provider_aura.h",
@@ -498,9 +486,7 @@ component("base") {
"cursor/cursor_loader_win.cc",
"cursor/cursor_loader_win.h",
]
- deps += [
- "//third_party/wtl",
- ]
+ deps += [ "//third_party/wtl" ]
cflags = [
"/wd4267", # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int.
"/wd4324", # Structure was padded due to __declspec(align()), which is
@@ -530,9 +516,7 @@ component("base") {
}
if (is_mac) {
- deps += [
- "//third_party/mozilla",
- ]
+ deps += [ "//third_party/mozilla" ]
sources -= [
"cursor/image_cursors.cc",
@@ -550,13 +534,11 @@ component("base") {
if (use_x11) {
#'all_dependent_settings': {
- #'ldflags': [
- #'-L<(PRODUCT_DIR)',
- #],
+ #'ldflags': [
+ #'-L<(PRODUCT_DIR)',
+ #],
#},
- configs += [
- "//build/config/linux:x11"
- ]
+ configs += [ "//build/config/linux:x11" ]
}
if (use_aura) {
@@ -584,9 +566,7 @@ component("base") {
"cursor/ozone/bitmap_cursor_factory_ozone.h",
]
- deps += [
- "//ui/ozone:ozone_base",
- ]
+ deps += [ "//ui/ozone:ozone_base" ]
}
if (!toolkit_views) {
@@ -616,13 +596,9 @@ component("base") {
"ui_base_types.cc",
]
- deps += [
- ":ui_base_jni_headers",
- ]
+ deps += [ ":ui_base_jni_headers" ]
- libs += [
- "jnigraphics",
- ]
+ libs += [ "jnigraphics" ]
}
if (is_android && is_android_webview_build) {
@@ -633,9 +609,7 @@ component("base") {
}
if (is_android && !use_aura) {
- sources -= [
- "cursor/cursor_android.cc",
- ]
+ sources -= [ "cursor/cursor_android.cc" ]
}
# Aura clipboard.
@@ -649,9 +623,7 @@ component("base") {
}
if (is_android || is_ios) {
- sources -= [
- "device_form_factor_desktop.cc",
- ]
+ sources -= [ "device_form_factor_desktop.cc" ]
}
}
@@ -690,9 +662,7 @@ source_set("test_support") {
}
if (!use_aura) {
- sources -= [
- "test/ui_controls_aura.cc",
- ]
+ sources -= [ "test/ui_controls_aura.cc" ]
}
}
@@ -714,201 +684,189 @@ if (is_android) {
# TODO(GYP): Make this work on Android and reenable it.
if (!is_android) {
-# TODO(tfarina): Rename this target to ui_base_unittests.
-# In order to do this we will need to keep this target, add a dummy
-# ui_base_unittests target that just points to ui_unittests, change
-# buildbot code to reference the new 'ui_base_unittests' target.
-# After buildbot is updated, we can make the changes in Chromium and
-# remove 'ui_unittests' target. crbug.com/331829
-# GYP version: ui/base/ui_base_tests.gyp:ui_unittests
-test("ui_unittests") {
- sources = [
- "l10n/l10n_util_mac_unittest.mm",
- "l10n/l10n_util_unittest.cc",
- "l10n/l10n_util_win_unittest.cc",
- "l10n/time_format_unittest.cc",
- "layout_unittest.cc",
- "models/tree_node_iterator_unittest.cc",
- "resource/data_pack_literal.cc",
- "resource/data_pack_unittest.cc",
- "resource/resource_bundle_unittest.cc",
- "test/test_clipboard_unittest.cc",
- "test/run_all_unittests.cc",
- ]
-
- if (is_ios) {
- # Compile this Mac file on iOS as well.
- set_sources_assignment_filter([])
- sources += [ "l10n/l10n_util_mac_unittest.mm" ]
- set_sources_assignment_filter(sources_assignment_filter)
- } else { # !is_ios
- sources += [
- "accelerators/accelerator_manager_unittest.cc",
- "accelerators/menu_label_accelerator_util_linux_unittest.cc",
- "clipboard/custom_data_helper_unittest.cc",
- "cocoa/base_view_unittest.mm",
- "cocoa/cocoa_base_utils_unittest.mm",
- "cocoa/controls/blue_label_button_unittest.mm",
- "cocoa/controls/hover_image_menu_button_unittest.mm",
- "cocoa/controls/hyperlink_button_cell_unittest.mm",
- "cocoa/controls/hyperlink_text_view_unittest.mm",
- "cocoa/focus_tracker_unittest.mm",
- "cocoa/fullscreen_window_manager_unittest.mm",
- "cocoa/hover_image_button_unittest.mm",
- "cocoa/menu_controller_unittest.mm",
- "cocoa/nsgraphics_context_additions_unittest.mm",
- "cocoa/nsview_additions_unittest.mm",
- "cocoa/tracking_area_unittest.mm",
- "dragdrop/os_exchange_data_provider_aurax11_unittest.cc",
- "models/list_model_unittest.cc",
- "models/list_selection_model_unittest.cc",
- "models/tree_node_model_unittest.cc",
- "test/data/resource.h",
- "text/bytes_formatting_unittest.cc",
- "touch/touch_editing_controller_unittest.cc",
- "view_prop_unittest.cc",
- "webui/web_ui_util_unittest.cc",
- "x/selection_requestor_unittest.cc",
- ]
- }
-
- if (build_ime) {
- sources += [
- "ime/candidate_window_unittest.cc",
- "ime/chromeos/character_composer_unittest.cc",
- "ime/input_method_base_unittest.cc",
- "ime/input_method_chromeos_unittest.cc",
- "ime/remote_input_method_win_unittest.cc",
- "ime/win/imm32_manager_unittest.cc",
- "ime/win/tsf_input_scope_unittest.cc",
- ]
- if (use_x11) {
- sources += [ "ime/composition_text_util_pango_unittest.cc" ]
+ # TODO(tfarina): Rename this target to ui_base_unittests.
+ # In order to do this we will need to keep this target, add a dummy
+ # ui_base_unittests target that just points to ui_unittests, change
+ # buildbot code to reference the new 'ui_base_unittests' target.
+ # After buildbot is updated, we can make the changes in Chromium and
+ # remove 'ui_unittests' target. crbug.com/331829
+ # GYP version: ui/base/ui_base_tests.gyp:ui_unittests
+ test("ui_unittests") {
+ sources = [
+ "l10n/l10n_util_mac_unittest.mm",
+ "l10n/l10n_util_unittest.cc",
+ "l10n/l10n_util_win_unittest.cc",
+ "l10n/time_format_unittest.cc",
+ "layout_unittest.cc",
+ "models/tree_node_iterator_unittest.cc",
+ "resource/data_pack_literal.cc",
+ "resource/data_pack_unittest.cc",
+ "resource/resource_bundle_unittest.cc",
+ "test/test_clipboard_unittest.cc",
+ "test/run_all_unittests.cc",
+ ]
+
+ if (is_ios) {
+ # Compile this Mac file on iOS as well.
+ set_sources_assignment_filter([])
+ sources += [ "l10n/l10n_util_mac_unittest.mm" ]
+ set_sources_assignment_filter(sources_assignment_filter)
+ } else { # !is_ios
+ sources += [
+ "accelerators/accelerator_manager_unittest.cc",
+ "accelerators/menu_label_accelerator_util_linux_unittest.cc",
+ "clipboard/custom_data_helper_unittest.cc",
+ "cocoa/base_view_unittest.mm",
+ "cocoa/cocoa_base_utils_unittest.mm",
+ "cocoa/controls/blue_label_button_unittest.mm",
+ "cocoa/controls/hover_image_menu_button_unittest.mm",
+ "cocoa/controls/hyperlink_button_cell_unittest.mm",
+ "cocoa/controls/hyperlink_text_view_unittest.mm",
+ "cocoa/focus_tracker_unittest.mm",
+ "cocoa/fullscreen_window_manager_unittest.mm",
+ "cocoa/hover_image_button_unittest.mm",
+ "cocoa/menu_controller_unittest.mm",
+ "cocoa/nsgraphics_context_additions_unittest.mm",
+ "cocoa/nsview_additions_unittest.mm",
+ "cocoa/tracking_area_unittest.mm",
+ "dragdrop/os_exchange_data_provider_aurax11_unittest.cc",
+ "models/list_model_unittest.cc",
+ "models/list_selection_model_unittest.cc",
+ "models/tree_node_model_unittest.cc",
+ "test/data/resource.h",
+ "text/bytes_formatting_unittest.cc",
+ "touch/touch_editing_controller_unittest.cc",
+ "view_prop_unittest.cc",
+ "webui/web_ui_util_unittest.cc",
+ "x/selection_requestor_unittest.cc",
+ ]
}
- if (!use_x11 && is_chromeos) {
- # These were already removed in the non-chromeos case.
- sources -= [
+
+ if (build_ime) {
+ sources += [
+ "ime/candidate_window_unittest.cc",
"ime/chromeos/character_composer_unittest.cc",
+ "ime/input_method_base_unittest.cc",
"ime/input_method_chromeos_unittest.cc",
+ "ime/remote_input_method_win_unittest.cc",
+ "ime/win/imm32_manager_unittest.cc",
+ "ime/win/tsf_input_scope_unittest.cc",
]
+ if (use_x11) {
+ sources += [ "ime/composition_text_util_pango_unittest.cc" ]
+ }
+ if (!use_x11 && is_chromeos) {
+ # These were already removed in the non-chromeos case.
+ sources -= [
+ "ime/chromeos/character_composer_unittest.cc",
+ "ime/input_method_chromeos_unittest.cc",
+ ]
+ }
}
- }
- deps = [
- "//base",
- "//base/allocator",
- "//base/test:test_support",
- "//net",
- "//skia",
- "//testing/gmock",
- "//testing/gtest",
- "//third_party/icu",
- "//ui/base",
- "//ui/base:test_support",
- "//ui/events:events_base",
- "//ui/events:test_support",
- "//ui/gfx:test_support",
- "//ui/resources",
- "//ui/resources:ui_test_pak",
- "//ui/strings",
- "//url",
- ]
-
- if (is_ios) {
- # TODO(GYP) lots of iOS-only steps for ui_unittests
- }
+ deps = [
+ "//base",
+ "//base/allocator",
+ "//base/test:test_support",
+ "//net",
+ "//skia",
+ "//testing/gmock",
+ "//testing/gtest",
+ "//third_party/icu",
+ "//ui/base",
+ "//ui/base:test_support",
+ "//ui/events:events_base",
+ "//ui/events:test_support",
+ "//ui/gfx:test_support",
+ "//ui/resources",
+ "//ui/resources:ui_test_pak",
+ "//ui/strings",
+ "//url",
+ ]
+
+ if (is_ios) {
+ # TODO(GYP) lots of iOS-only steps for ui_unittests
+ }
- if (is_win) {
- sources += [
- "dragdrop/os_exchange_data_win_unittest.cc",
- "win/hwnd_subclass_unittest.cc",
- "win/open_file_name_win_unittest.cc",
- ]
+ if (is_win) {
+ sources += [
+ "dragdrop/os_exchange_data_win_unittest.cc",
+ "win/hwnd_subclass_unittest.cc",
+ "win/open_file_name_win_unittest.cc",
+ ]
- ldflags = [
- "/DELAYLOAD:d2d1.dll",
- "/DELAYLOAD:d3d10_1.dll",
- ]
- libs = [
- "d2d1.lib",
- "d3d10_1.lib",
- "imm32.lib",
- "oleacc.lib",
- ]
+ ldflags = [
+ "/DELAYLOAD:d2d1.dll",
+ "/DELAYLOAD:d3d10_1.dll",
+ ]
+ libs = [
+ "d2d1.lib",
+ "d3d10_1.lib",
+ "imm32.lib",
+ "oleacc.lib",
+ ]
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- cflags = [ "/wd4267" ]
- }
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ cflags = [ "/wd4267" ]
+ }
- if (is_android) {
- deps += [
- #"testing/android/native_test.gyp:native_test_native_code" TODO(GYP)
- ]
- }
+ if (is_android) {
+ deps += [
+ #"testing/android/native_test.gyp:native_test_native_code" TODO(GYP)
+ ]
+ }
- if (use_pango) {
- configs += [
- "//build/config/linux:pangocairo"
- ]
- }
+ if (use_pango) {
+ configs += [ "//build/config/linux:pangocairo" ]
+ }
- if (use_x11) {
- sources += [
- "cursor/cursor_loader_x11_unittest.cc"
- ]
+ if (use_x11) {
+ sources += [ "cursor/cursor_loader_x11_unittest.cc" ]
- configs += [
- "//build/config/linux:x11"
- ]
+ configs += [ "//build/config/linux:x11" ]
- deps += [
- "//ui/events/platform/x11",
- "//ui/gfx/x",
- ]
+ deps += [
+ "//ui/events/platform/x11",
+ "//ui/gfx/x",
+ ]
- datadeps = [
- "//tools/xdisplaycheck"
- ]
- }
+ datadeps = [
+ "//tools/xdisplaycheck",
+ ]
+ }
- if (!is_win || !use_aura) {
- sources -= [
- "view_prop_unittest.cc"
- ]
- }
+ if (!is_win || !use_aura) {
+ sources -= [ "view_prop_unittest.cc" ]
+ }
- if (is_mac) {
- sources -= [
- "dragdrop/os_exchange_data_provider_aurax11_unittest.cc",
- "x/selection_requestor_unittest.cc",
- ]
+ if (is_mac) {
+ sources -= [
+ "dragdrop/os_exchange_data_provider_aurax11_unittest.cc",
+ "x/selection_requestor_unittest.cc",
+ ]
- deps += [
- "//third_party/mozilla",
- #'ui_unittests_bundle', TODO(GYP)
- ]
- }
+ deps += [
+ "//third_party/mozilla",
+ #'ui_unittests_bundle', TODO(GYP)
+ ]
+ }
- if (use_aura || toolkit_views) {
- sources += [
- "dragdrop/os_exchange_data_unittest.cc"
- ]
+ if (use_aura || toolkit_views) {
+ sources += [ "dragdrop/os_exchange_data_unittest.cc" ]
- deps += [
- "//ui/events",
- "//ui/events/platform",
- ]
- }
+ deps += [
+ "//ui/events",
+ "//ui/events/platform",
+ ]
+ }
- if (is_chromeos) {
- sources -= [
- "dragdrop/os_exchange_data_provider_aurax11_unittest.cc",
- "x/selection_requestor_unittest.cc",
- ]
- deps += [
- "//chromeos",
- ]
+ if (is_chromeos) {
+ sources -= [
+ "dragdrop/os_exchange_data_provider_aurax11_unittest.cc",
+ "x/selection_requestor_unittest.cc",
+ ]
+ deps += [ "//chromeos" ]
+ }
}
}
-}
# TODO(GYP) Mac (ui_unittest_bundle) and Android (ui_unittests_apk).
« no previous file with comments | « ui/aura/BUILD.gn ('k') | ui/compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698