| # 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/buildflag_header.gni") |
| import("//build/config/jumbo.gni") |
| import("//build/config/ui.gni") |
| import("//components/vector_icons/vector_icons.gni") |
| import("//device/vr/buildflags/buildflags.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| |
| if (is_android) { |
| import("//build/config/android/rules.gni") |
| } |
| |
| buildflag_header("buildflags") { |
| header = "buildflags.h" |
| flags = [ "ENABLE_VR=$enable_vr" ] |
| } |
| |
| aggregate_vector_icons("omnibox_vector_icons") { |
| icon_directory = "vector_icons" |
| |
| icons = [ |
| "answer_calculator.icon", |
| "answer_currency.icon", |
| "answer_default.icon", |
| "answer_dictionary.icon", |
| "answer_finance.icon", |
| "answer_sunrise.icon", |
| "answer_translation.icon", |
| "answer_when_is.icon", |
| "blank.icon", |
| "bookmark.icon", |
| "calculator.icon", |
| "clear.icon", |
| "clock.icon", |
| "drive_docs.icon", |
| "drive_forms.icon", |
| "drive_image.icon", |
| "drive_logo.icon", |
| "drive_pdf.icon", |
| "drive_sheets.icon", |
| "drive_slides.icon", |
| "drive_video.icon", |
| "extension_app.icon", |
| "find_in_page.icon", |
| "http.icon", |
| "https_invalid.icon", |
| "https_valid.icon", |
| "https_valid_in_chip.icon", |
| "keyword_search.icon", |
| "offline_pin.icon", |
| "open_in_new.icon", |
| "page.icon", |
| "pedal.icon", |
| "plus.icon", |
| "product.icon", |
| "star_active.icon", |
| "star.icon", |
| "switch.icon", |
| "tab.icon", |
| ] |
| } |
| |
| static_library("vector_icons") { |
| sources = get_target_outputs(":omnibox_vector_icons") |
| deps = [ |
| ":omnibox_vector_icons", |
| "//components/vector_icons", |
| "//skia", |
| "//ui/gfx", |
| ] |
| } |
| |
| jumbo_static_library("browser") { |
| sources = [ |
| "answers_cache.cc", |
| "answers_cache.h", |
| "autocomplete_classifier.cc", |
| "autocomplete_classifier.h", |
| "autocomplete_controller.cc", |
| "autocomplete_controller.h", |
| "autocomplete_controller_delegate.h", |
| "autocomplete_input.cc", |
| "autocomplete_input.h", |
| "autocomplete_match.cc", |
| "autocomplete_match.h", |
| "autocomplete_match_classification.cc", |
| "autocomplete_match_classification.h", |
| "autocomplete_match_type.cc", |
| "autocomplete_match_type.h", |
| "autocomplete_provider.cc", |
| "autocomplete_provider.h", |
| "autocomplete_provider_client.cc", |
| "autocomplete_provider_client.h", |
| "autocomplete_result.cc", |
| "autocomplete_result.h", |
| "autocomplete_scheme_classifier.h", |
| "base_search_provider.cc", |
| "base_search_provider.h", |
| "bookmark_provider.cc", |
| "bookmark_provider.h", |
| "builtin_provider.cc", |
| "builtin_provider.h", |
| "clipboard_provider.cc", |
| "clipboard_provider.h", |
| "contextual_suggestions_service.cc", |
| "contextual_suggestions_service.h", |
| "document_provider.cc", |
| "document_provider.h", |
| "document_suggestions_service.cc", |
| "document_suggestions_service.h", |
| "favicon_cache.cc", |
| "favicon_cache.h", |
| "history_match.cc", |
| "history_match.h", |
| "history_provider.cc", |
| "history_provider.h", |
| "history_quick_provider.cc", |
| "history_quick_provider.h", |
| "history_url_provider.cc", |
| "history_url_provider.h", |
| "in_memory_url_index.cc", |
| "in_memory_url_index.h", |
| "in_memory_url_index_types.cc", |
| "in_memory_url_index_types.h", |
| "keyword_extensions_delegate.cc", |
| "keyword_extensions_delegate.h", |
| "keyword_provider.cc", |
| "keyword_provider.h", |
| "location_bar_model.h", |
| "location_bar_model_delegate.cc", |
| "location_bar_model_delegate.h", |
| "location_bar_model_impl.cc", |
| "location_bar_model_impl.h", |
| "match_compare.h", |
| "omnibox_client.cc", |
| "omnibox_client.h", |
| "omnibox_controller.cc", |
| "omnibox_controller.h", |
| "omnibox_controller_emitter.cc", |
| "omnibox_controller_emitter.h", |
| "omnibox_edit_controller.cc", |
| "omnibox_edit_controller.h", |
| "omnibox_edit_model.cc", |
| "omnibox_edit_model.h", |
| "omnibox_event_global_tracker.cc", |
| "omnibox_event_global_tracker.h", |
| "omnibox_field_trial.cc", |
| "omnibox_field_trial.h", |
| "omnibox_log.cc", |
| "omnibox_log.h", |
| "omnibox_metrics_provider.cc", |
| "omnibox_metrics_provider.h", |
| "omnibox_navigation_observer.h", |
| "omnibox_pedal.cc", |
| "omnibox_pedal.h", |
| "omnibox_pedal_concepts.h", |
| "omnibox_pedal_implementations.cc", |
| "omnibox_pedal_implementations.h", |
| "omnibox_pedal_provider.cc", |
| "omnibox_pedal_provider.h", |
| "omnibox_popup_model.cc", |
| "omnibox_popup_model.h", |
| "omnibox_popup_view.h", |
| "omnibox_pref_names.cc", |
| "omnibox_pref_names.h", |
| "omnibox_view.cc", |
| "omnibox_view.h", |
| "on_device_head_serving.cc", |
| "on_device_head_serving.h", |
| "scored_history_match.cc", |
| "scored_history_match.h", |
| "search_provider.cc", |
| "search_provider.h", |
| "search_suggestion_parser.cc", |
| "search_suggestion_parser.h", |
| "shortcuts_backend.cc", |
| "shortcuts_backend.h", |
| "shortcuts_constants.cc", |
| "shortcuts_constants.h", |
| "shortcuts_database.cc", |
| "shortcuts_database.h", |
| "shortcuts_provider.cc", |
| "shortcuts_provider.h", |
| "suggestion_answer.cc", |
| "suggestion_answer.h", |
| "tailored_word_break_iterator.cc", |
| "tailored_word_break_iterator.h", |
| "titled_url_match_utils.cc", |
| "titled_url_match_utils.h", |
| "url_index_private_data.cc", |
| "url_index_private_data.h", |
| "url_prefix.cc", |
| "url_prefix.h", |
| "verbatim_match.cc", |
| "verbatim_match.h", |
| "zero_suggest_provider.cc", |
| "zero_suggest_provider.h", |
| ] |
| |
| defines = [ "OMNIBOX_BROWSER_IMPLEMENTATION" ] |
| |
| public_deps = [ |
| "//base", |
| "//components/history/core/browser", |
| "//components/omnibox/common", |
| "//components/security_state/core", |
| "//third_party/metrics_proto", |
| "//url", |
| ] |
| deps = [ |
| ":buildflags", |
| ":in_memory_url_index_cache_proto", |
| "//base:i18n", |
| "//components/bookmarks/browser", |
| "//components/data_use_measurement/core", |
| "//components/favicon/core", |
| "//components/favicon_base", |
| "//components/keyed_service/core", |
| "//components/metrics", |
| "//components/navigation_metrics", |
| "//components/open_from_clipboard", |
| "//components/pref_registry", |
| "//components/prefs", |
| "//components/query_parser", |
| "//components/resources", |
| "//components/search", |
| "//components/search_engines", |
| "//components/sessions", |
| "//components/strings", |
| "//components/sync", |
| "//components/url_formatter", |
| "//components/variations", |
| "//components/variations/net", |
| "//extensions/common:common_constants", |
| "//net", |
| "//services/identity/public/cpp", |
| "//skia", |
| "//sql", |
| "//third_party/protobuf:protobuf_lite", |
| "//third_party/re2", |
| "//third_party/zlib/google:compression_utils", |
| "//ui/base", |
| "//ui/gfx", |
| ] |
| |
| if ((!is_android || enable_vr) && !is_ios) { |
| deps += [ ":vector_icons" ] |
| } |
| |
| if (is_android) { |
| deps += [ ":jni_headers" ] |
| } |
| |
| if (!is_ios) { |
| deps += [ "//components/keyed_service/content" ] |
| } |
| } |
| |
| if (is_android) { |
| android_library("browser_java") { |
| java_files = [ |
| "android/java/src/org/chromium/components/omnibox/SuggestionAnswer.java", |
| ] |
| |
| deps = [ |
| "//base:base_java", |
| "//third_party/android_deps:com_android_support_support_compat_java", |
| ] |
| |
| srcjar_deps = [ ":browser_java_enums_srcjar" ] |
| } |
| |
| java_cpp_enum("browser_java_enums_srcjar") { |
| sources = [ |
| "autocomplete_match.h", |
| "autocomplete_match_type.h", |
| "suggestion_answer.h", |
| ] |
| } |
| |
| generate_jni("jni_headers") { |
| sources = [ |
| "android/java/src/org/chromium/components/omnibox/SuggestionAnswer.java", |
| ] |
| jni_package = "components/omnibox/browser" |
| } |
| } |
| |
| proto_library("in_memory_url_index_cache_proto") { |
| sources = [ |
| "in_memory_url_index_cache.proto", |
| ] |
| } |
| |
| jumbo_static_library("test_support") { |
| testonly = true |
| sources = [ |
| "fake_autocomplete_provider_client.cc", |
| "fake_autocomplete_provider_client.h", |
| "history_index_restore_observer.cc", |
| "history_index_restore_observer.h", |
| "history_test_util.cc", |
| "history_test_util.h", |
| "in_memory_url_index_test_util.cc", |
| "in_memory_url_index_test_util.h", |
| "mock_autocomplete_provider_client.cc", |
| "mock_autocomplete_provider_client.h", |
| "shortcuts_provider_test_util.cc", |
| "shortcuts_provider_test_util.h", |
| "test_location_bar_model.cc", |
| "test_location_bar_model.h", |
| "test_omnibox_client.cc", |
| "test_omnibox_client.h", |
| "test_omnibox_edit_controller.cc", |
| "test_omnibox_edit_controller.h", |
| "test_omnibox_edit_model.cc", |
| "test_omnibox_edit_model.h", |
| "test_omnibox_view.cc", |
| "test_omnibox_view.h", |
| "test_scheme_classifier.cc", |
| "test_scheme_classifier.h", |
| ] |
| |
| public_deps = [ |
| ":browser", |
| "//base", |
| ] |
| |
| deps = [ |
| "//base/test:test_support", |
| "//components/bookmarks/browser", |
| "//components/bookmarks/test", |
| "//components/history/core/browser", |
| "//components/history/core/test", |
| "//components/resources", |
| "//components/search_engines", |
| "//components/sessions", |
| "//net", |
| "//services/network:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/metrics_proto", |
| "//ui/base", |
| "//ui/gfx", |
| ] |
| |
| if (toolkit_views) { |
| # Needed to get the TOOLKIT_VIEWS define. |
| deps += [ "//ui/views" ] |
| } |
| } |
| |
| bundle_data("unit_tests_bundle_data") { |
| visibility = [ ":unit_tests" ] |
| testonly = true |
| sources = [ |
| "//components/test/data/omnibox/Shortcuts.no_fill_into_edit.sql", |
| "//components/test/data/omnibox/Shortcuts.v0.sql", |
| "//components/test/data/omnibox/in_memory_url_index_test.sql", |
| "//components/test/data/omnibox/in_memory_url_index_test_limited.sql", |
| "//components/test/data/omnibox/on_device_head_test_model.bin", |
| ] |
| outputs = [ |
| "{{bundle_resources_dir}}/" + |
| "{{source_root_relative_dir}}/{{source_file_part}}", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "answers_cache_unittest.cc", |
| "autocomplete_input_unittest.cc", |
| "autocomplete_match_type_unittest.cc", |
| "autocomplete_match_unittest.cc", |
| "autocomplete_provider_unittest.cc", |
| "autocomplete_result_unittest.cc", |
| "base_search_provider_unittest.cc", |
| "bookmark_provider_unittest.cc", |
| "builtin_provider_unittest.cc", |
| "clipboard_provider_unittest.cc", |
| "contextual_suggestions_service_unittest.cc", |
| "document_provider_unittest.cc", |
| "favicon_cache_unittest.cc", |
| "history_provider_unittest.cc", |
| "history_quick_provider_unittest.cc", |
| "history_url_provider_unittest.cc", |
| "in_memory_url_index_types_unittest.cc", |
| "in_memory_url_index_unittest.cc", |
| "keyword_provider_unittest.cc", |
| "location_bar_model_impl_unittest.cc", |
| "omnibox_controller_unittest.cc", |
| "omnibox_edit_model_unittest.cc", |
| "omnibox_field_trial_unittest.cc", |
| "omnibox_pedal_implementations_unittest.cc", |
| "omnibox_pedal_provider_unittest.cc", |
| "omnibox_pedal_unittest.cc", |
| "omnibox_popup_model_unittest.cc", |
| "omnibox_view_unittest.cc", |
| "on_device_head_serving_unittest.cc", |
| "scored_history_match_unittest.cc", |
| "search_suggestion_parser_unittest.cc", |
| "shortcuts_backend_unittest.cc", |
| "shortcuts_database_unittest.cc", |
| "shortcuts_provider_unittest.cc", |
| "suggestion_answer_unittest.cc", |
| "tailored_word_break_iterator_unittest.cc", |
| "titled_url_match_utils_unittest.cc", |
| "url_prefix_unittest.cc", |
| "zero_suggest_provider_unittest.cc", |
| ] |
| |
| deps = [ |
| ":browser", |
| ":test_support", |
| ":unit_tests_bundle_data", |
| "//base", |
| "//base/test:test_support", |
| "//components/bookmarks/browser", |
| "//components/bookmarks/test", |
| "//components/favicon/core/test:test_support", |
| "//components/history/core/test", |
| "//components/open_from_clipboard:test_support", |
| "//components/prefs:test_support", |
| "//components/search", |
| "//components/search_engines", |
| "//components/sessions", |
| "//components/strings", |
| "//components/url_formatter", |
| "//components/variations", |
| "//services/network:test_support", |
| "//sql", |
| "//sql:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//ui/base:test_support", |
| "//ui/gfx:test_support", |
| "//url", |
| ] |
| } |