| # Copyright 2015 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| source_set("common") { |
| sources = [ |
| "omnibox_feature_configs.cc", |
| "omnibox_feature_configs.h", |
| "omnibox_features.cc", |
| "omnibox_features.h", |
| "omnibox_focus_state.h", |
| "string_cleaning.cc", |
| "string_cleaning.h", |
| "zero_suggest_cache_service_interface.cc", |
| "zero_suggest_cache_service_interface.h", |
| ] |
| deps = [ |
| "//base", |
| "//base:i18n", |
| "//components/url_formatter", |
| "//ui/base:features", |
| "//url", |
| ] |
| |
| if (is_android) { |
| deps += [ ":jni_headers" ] |
| } |
| } |
| |
| if (is_android) { |
| import("//build/config/android/config.gni") |
| import("//build/config/android/rules.gni") |
| import("//third_party/jni_zero/jni_zero.gni") |
| |
| generate_jni("jni_headers") { |
| sources = [ |
| "android/java/src/org/chromium/components/omnibox/OmniboxFeatureMap.java", |
| ] |
| } |
| |
| java_cpp_features("java_features_srcjar") { |
| visibility = [ ":*" ] |
| sources = [ "//components/omnibox/common/omnibox_features.cc" ] |
| class_name = "org.chromium.components.omnibox.OmniboxFeatureList" |
| } |
| |
| android_library("features_java") { |
| sources = [ |
| "android/java/src/org/chromium/components/omnibox/OmniboxFeatureMap.java", |
| "android/java/src/org/chromium/components/omnibox/OmniboxFeatures.java", |
| ] |
| srcjar_deps = [ |
| ":java_features_srcjar", |
| ":jni_headers", |
| ] |
| deps = [ |
| "$google_play_services_package:google_play_services_location_java", |
| "//base:base_java", |
| "//chrome/browser/feedback/android:java", |
| "//components/cached_flags:java", |
| "//third_party/androidx:androidx_annotation_annotation_java", |
| "//third_party/jni_zero:jni_zero_java", |
| "//third_party/omnibox_proto:omnibox_proto_java", |
| "//ui/android:ui_java", |
| ] |
| } |
| |
| robolectric_library("junit") { |
| sources = [ "android/java/src/org/chromium/components/omnibox/OmniboxFeaturesTest.java" ] |
| deps = [ |
| "//base:base_java_test_support", |
| "//base:base_junit_test_support", |
| "//components/cached_flags:java", |
| "//components/omnibox/common:features_java", |
| "//third_party/androidx:androidx_test_runner_java", |
| "//third_party/junit", |
| "//ui/android:ui_java", |
| ] |
| } |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ "string_cleaning_unittest.cc" ] |
| deps = [ |
| ":common", |
| "//base/test:test_support", |
| "//testing/gtest", |
| "//url", |
| ] |
| } |