| # 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") |
| |
| if (is_android) { |
| import("//build/config/android/config.gni") |
| import("//build/config/android/rules.gni") |
| } |
| |
| component("base") { |
| output_name = "ui_base" |
| sources = [ |
| "accelerators/accelerator.cc", |
| "accelerators/accelerator.h", |
| "accelerators/accelerator_history.cc", |
| "accelerators/accelerator_history.h", |
| "accelerators/accelerator_manager.cc", |
| "accelerators/accelerator_manager.h", |
| "accelerators/platform_accelerator.h", |
| ] |
| |
| defines = [ "UI_BASE_IMPLEMENTATION" ] |
| |
| public_deps = [ |
| "//base", |
| "//skia", |
| "//ui/events", |
| "//ui/events/platform", |
| "//ui/events:events_base", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| ] |
| deps = [ |
| "//base/third_party/dynamic_annotations", |
| "//base:base_static", |
| "//base:i18n", |
| "//third_party/icu", |
| "//url", |
| ] |
| |
| if (is_linux) { |
| configs += [ "//build/config/linux:fontconfig" ] |
| } |
| |
| libs = [] |
| |
| if (use_x11) { |
| #'all_dependent_settings': { |
| #'ldflags': [ |
| #'-L<(PRODUCT_DIR)', |
| #], |
| #}, |
| configs += [ "//build/config/linux:x11" ] |
| } |
| |
| if (is_android) { |
| deps += [ |
| ":ui_base_jni_headers", |
| "//cc", |
| ] |
| |
| libs += [ "jnigraphics" ] |
| } |
| } |
| |
| if (is_android) { |
| generate_jni("ui_base_jni_headers") { |
| sources = [ |
| "../android/java/src/org/chromium/ui/base/DeviceFormFactor.java", |
| "../android/java/src/org/chromium/ui/base/SelectFileDialog.java", |
| "../android/java/src/org/chromium/ui/base/ViewAndroid.java", |
| "../android/java/src/org/chromium/ui/base/WindowAndroid.java", |
| ] |
| jni_package = "base" |
| } |
| } |
| |
| if (false) { |
| # 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 |
| test("ui_unittests") { |
| sources = [ |
| "test/run_all_unittests.cc", |
| ] |
| |
| sources += [ "test/data/resource.h" ] |
| |
| deps = [ |
| "//base", |
| "//base/allocator", |
| "//base/test:test_support", |
| "//net", |
| "//skia", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/icu", |
| "//ui/base", |
| "//ui/events:events_base", |
| "//ui/events:test_support", |
| "//ui/gfx:test_support", |
| "//url", |
| ] |
| |
| if (is_android) { |
| deps += [ |
| #"testing/android/native_test.gyp:native_test_native_code" TODO(GYP) |
| ] |
| } |
| |
| if (use_x11) { |
| configs += [ "//build/config/linux:x11" ] |
| |
| deps += [ "//ui/gfx/x" ] |
| |
| datadeps = [ |
| "//tools/xdisplaycheck", |
| ] |
| } |
| |
| sources -= [ "view_prop_unittest.cc" ] |
| |
| if (is_chromeos) { |
| sources += [ "../chromeos/touch_exploration_controller_unittest.cc" ] |
| deps += [ |
| "//chromeos", |
| "//ui/aura:test_support", |
| "//ui/events:gesture_detection", |
| "//ui/chromeos:ui_chromeos", |
| ] |
| } |
| } |
| } |
| } |
| # TODO(GYP) Mac (ui_unittest_bundle) and Android (ui_unittests_apk). |