mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-01 01:36:09 +03:00
366 lines
10 KiB
Plaintext
366 lines
10 KiB
Plaintext
# 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("//device/vr/buildflags/buildflags.gni")
|
|
import("//third_party/protobuf/proto_library.gni")
|
|
import("//components/vector_icons/vector_icons.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_currency.icon",
|
|
"answer_default.icon",
|
|
"answer_dictionary.icon",
|
|
"answer_finance.icon",
|
|
"answer_sunrise.icon",
|
|
"answer_when_is.icon",
|
|
"drive_docs.icon",
|
|
"drive_logo.icon",
|
|
"drive_sheets.icon",
|
|
"drive_slides.icon",
|
|
"blank.icon",
|
|
"calculator.icon",
|
|
"extension_app.icon",
|
|
"http.icon",
|
|
"keyword_search.icon",
|
|
"md_page.icon",
|
|
"star.icon",
|
|
"switch.icon",
|
|
"tab.icon",
|
|
"touchable_bookmark.icon",
|
|
"touchable_clear.icon",
|
|
"touchable_page.icon",
|
|
"touchable_search.icon",
|
|
]
|
|
}
|
|
|
|
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_type.cc",
|
|
"autocomplete_match_type.h",
|
|
"autocomplete_provider.cc",
|
|
"autocomplete_provider.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_url_provider.cc",
|
|
"clipboard_url_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",
|
|
"match_compare.h",
|
|
"omnibox_client.cc",
|
|
"omnibox_client.h",
|
|
"omnibox_controller.cc",
|
|
"omnibox_controller.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_popup_model.cc",
|
|
"omnibox_popup_model.h",
|
|
"omnibox_popup_view.h",
|
|
"omnibox_pref_names.cc",
|
|
"omnibox_pref_names.h",
|
|
"omnibox_switches.cc",
|
|
"omnibox_switches.h",
|
|
"omnibox_view.cc",
|
|
"omnibox_view.h",
|
|
"query_in_omnibox.cc",
|
|
"query_in_omnibox.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 = [
|
|
"//components/history/core/browser",
|
|
"//components/omnibox/common",
|
|
"//third_party/metrics_proto",
|
|
]
|
|
deps = [
|
|
":buildflags",
|
|
":in_memory_url_index_cache_proto",
|
|
"//base",
|
|
"//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/toolbar",
|
|
"//components/url_formatter",
|
|
"//components/variations",
|
|
"//components/variations/net",
|
|
"//extensions/common:common_constants",
|
|
"//net",
|
|
"//services/identity/public/cpp",
|
|
"//skia",
|
|
"//sql",
|
|
"//third_party/protobuf:protobuf_lite",
|
|
"//ui/base",
|
|
"//ui/gfx",
|
|
"//url",
|
|
]
|
|
|
|
if ((!is_android || enable_vr) && !is_ios) {
|
|
sources += get_target_outputs(":omnibox_vector_icons")
|
|
deps += [
|
|
":omnibox_vector_icons",
|
|
"//components/vector_icons",
|
|
]
|
|
}
|
|
|
|
# TODO(brettw) Fix the include cycle and remove this line.
|
|
allow_circular_includes_from = [ "//components/search_engines" ]
|
|
}
|
|
|
|
if (is_android) {
|
|
java_cpp_enum("autocomplete_match_javagen") {
|
|
sources = [
|
|
"autocomplete_match.h",
|
|
]
|
|
}
|
|
|
|
java_cpp_enum("autocomplete_match_type_javagen") {
|
|
sources = [
|
|
"autocomplete_match_type.h",
|
|
]
|
|
}
|
|
}
|
|
|
|
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_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",
|
|
]
|
|
|
|
deps = [
|
|
":browser",
|
|
"//base",
|
|
"//base/test:test_support",
|
|
"//components/bookmarks/browser",
|
|
"//components/bookmarks/test",
|
|
"//components/history/core/browser",
|
|
"//components/history/core/test",
|
|
"//components/search_engines",
|
|
"//components/sessions",
|
|
"//components/toolbar:test_support",
|
|
"//net",
|
|
"//services/network:test_support",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
"//third_party/metrics_proto",
|
|
"//ui/base",
|
|
]
|
|
}
|
|
|
|
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",
|
|
]
|
|
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_url_provider_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",
|
|
"omnibox_controller_unittest.cc",
|
|
"omnibox_edit_model_unittest.cc",
|
|
"omnibox_field_trial_unittest.cc",
|
|
"omnibox_popup_model_unittest.cc",
|
|
"omnibox_view_unittest.cc",
|
|
"query_in_omnibox_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/toolbar:test_support",
|
|
"//components/url_formatter",
|
|
"//components/variations",
|
|
"//services/network:test_support",
|
|
"//sql",
|
|
"//sql:test_support",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
"//ui/base:test_support",
|
|
"//url",
|
|
]
|
|
}
|