# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
assert(is_chromeos_ash)
static_library("input_method") {
sources = [
"accessibility.cc",
"accessibility.h",
"assistive_input_denylist.cc",
"assistive_input_denylist.h",
"assistive_prefs.cc",
"assistive_prefs.h",
"assistive_suggester.cc",
"assistive_suggester.h",
"assistive_suggester_client_filter.cc",
"assistive_suggester_client_filter.h",
"assistive_suggester_switch.h",
"assistive_window_controller.cc",
"assistive_window_controller.h",
"assistive_window_controller_delegate.h",
"assistive_window_properties.cc",
"assistive_window_properties.h",
"autocorrect_enums.h",
"autocorrect_manager.cc",
"autocorrect_manager.h",
"autocorrect_prefs.cc",
"autocorrect_prefs.h",
"candidate_window_controller.cc",
"candidate_window_controller.h",
"candidate_window_controller_impl.cc",
"candidate_window_controller_impl.h",
"component_extension_ime_manager_delegate_impl.cc",
"component_extension_ime_manager_delegate_impl.h",
"diacritics_insensitive_string_comparator.cc",
"diacritics_insensitive_string_comparator.h",
"editor_announcer.cc",
"editor_announcer.h",
"editor_client_connector.cc",
"editor_client_connector.h",
"editor_config_factory.cc",
"editor_config_factory.h",
"editor_consent_enums.cc",
"editor_consent_enums.h",
"editor_consent_store.cc",
"editor_consent_store.h",
"editor_context.cc",
"editor_context.h",
"editor_event_proxy.cc",
"editor_event_proxy.h",
"editor_event_sink.h",
"editor_feedback.cc",
"editor_feedback.h",
"editor_geolocation_mock_provider.cc",
"editor_geolocation_mock_provider.h",
"editor_geolocation_provider.h",
"editor_geolocation_provider_from_finch.cc",
"editor_geolocation_provider_from_finch.h",
"editor_helpers.cc",
"editor_helpers.h",
"editor_mediator.cc",
"editor_mediator.h",
"editor_mediator_factory.cc",
"editor_mediator_factory.h",
"editor_metrics_enums.h",
"editor_metrics_recorder.cc",
"editor_metrics_recorder.h",
"editor_panel_manager.cc",
"editor_panel_manager.h",
"editor_query_context.cc",
"editor_query_context.h",
"editor_service_connector.cc",
"editor_service_connector.h",
"editor_switch.cc",
"editor_switch.h",
"editor_system_actuator.cc",
"editor_system_actuator.h",
"editor_text_insertion.cc",
"editor_text_insertion.h",
"editor_text_query_from_manta.cc",
"editor_text_query_from_manta.h",
"editor_text_query_from_memory.cc",
"editor_text_query_from_memory.h",
"editor_text_query_provider.cc",
"editor_text_query_provider.h",
"emoji_suggester.cc",
"emoji_suggester.h",
"field_trial.cc",
"field_trial.h",
"get_current_window_properties.cc",
"get_current_window_properties.h",
"grammar_manager.cc",
"grammar_manager.h",
"grammar_service_client.cc",
"grammar_service_client.h",
"ime_service_connector.cc",
"ime_service_connector.h",
"input_method_configuration.cc",
"input_method_configuration.h",
"input_method_delegate_impl.cc",
"input_method_delegate_impl.h",
"input_method_engine.cc",
"input_method_engine.h",
"input_method_engine_observer.h",
"input_method_manager_impl.cc",
"input_method_manager_impl.h",
"input_method_options_observer.cc",
"input_method_options_observer.h",
"input_method_persistence.cc",
"input_method_persistence.h",
"input_method_quick_settings_helpers.cc",
"input_method_quick_settings_helpers.h",
"input_method_settings.cc",
"input_method_settings.h",
"input_method_syncer.cc",
"input_method_syncer.h",
"input_methods_by_language.cc",
"input_methods_by_language.h",
"longpress_control_v_suggester.cc",
"longpress_control_v_suggester.h",
"longpress_diacritics_suggester.cc",
"longpress_diacritics_suggester.h",
"longpress_suggester.cc",
"longpress_suggester.h",
"multi_word_suggester.cc",
"multi_word_suggester.h",
"native_input_method_engine.cc",
"native_input_method_engine.h",
"native_input_method_engine_observer.cc",
"native_input_method_engine_observer.h",
"pref_change_recorder.cc",
"pref_change_recorder.h",
"screen_projection_change_monitor.cc",
"screen_projection_change_monitor.h",
"suggester.h",
"suggestion_enums.h",
"suggestion_handler_interface.h",
"suggestions_collector.cc",
"suggestions_collector.h",
"suggestions_service_client.cc",
"suggestions_service_client.h",
"suggestions_source.h",
"text_field_contextual_info_fetcher.cc",
"text_field_contextual_info_fetcher.h",
"text_utils.cc",
"text_utils.h",
"url_utils.cc",
"url_utils.h",
]
public_deps = [
"//ash",
"//ash/public/cpp",
"//base",
"//build:chromeos_buildflags",
"//chrome/browser:browser_public_dependencies",
"//chrome/browser/profiles:profile",
"//chrome/browser/ui/ash/keyboard",
"//chromeos/ash/services/ime/public/cpp:structs",
"//chromeos/ash/services/ime/public/mojom",
"//chromeos/ash/services/orca/public/mojom",
"//chromeos/crosapi/mojom",
"//chromeos/ui/base",
"//components/feedback",
"//components/keyed_service/core",
"//components/manta",
"//components/prefs",
"//components/sync_preferences",
"//content/public/browser",
"//extensions/common",
"//mojo/public/cpp/bindings",
"//services/metrics/public/cpp:metrics_cpp",
"//services/network/public/cpp",
"//third_party/icu:icui18n",
"//ui/base/ime:ime_types",
"//ui/base/ime:text_input_types",
"//ui/base/ime/ash",
"//ui/display",
"//ui/events",
"//ui/events:dom_keycode_converter",
"//ui/gfx/range",
"//ui/views",
"//url",
]
deps = [
"//ash/constants",
"//ash/keyboard/ui",
"//ash/webui/settings/public/constants:mojom",
"//base:i18n",
"//build:branding_buildflags",
"//chrome/app:generated_resources",
"//chrome/browser:browser_process",
"//chrome/browser:resources",
"//chrome/browser/ash/crosapi:browser_util",
"//chrome/browser/ash/file_manager",
"//chrome/browser/ash/input_method/japanese",
"//chrome/browser/ash/login/demo_mode",
"//chrome/browser/ash/login/session",
"//chrome/browser/ash/magic_boost",
"//chrome/browser/ash/profiles",
"//chrome/browser/feedback",
"//chrome/browser/ui/ash/login",
"//chrome/browser/ui/aura/accessibility",
"//chrome/browser/ui/webui/ash/settings/search",
"//chrome/browser/web_applications",
"//chrome/common",
"//chrome/common:channel_info",
"//chrome/common:chrome_features",
"//chrome/common:constants",
"//chromeos/ash/components/language_preferences",
"//chromeos/ash/components/settings",
"//chromeos/ash/services/federated/public/mojom",
"//chromeos/ash/services/ime:constants",
"//chromeos/components/editor_menu/public/cpp",
"//chromeos/components/kiosk",
"//chromeos/constants",
"//chromeos/ime:gencode",
"//chromeos/services/machine_learning/public/cpp",
"//chromeos/strings",
"//components/account_id",
"//components/exo",
"//components/feedback/redaction_tool",
"//components/language/core/browser",
"//components/language/core/common",
"//components/pref_registry",
"//components/signin/public/base",
"//components/signin/public/identity_manager",
"//components/spellcheck/browser",
"//components/strings:components_strings",
"//components/user_manager",
"//components/user_prefs",
"//components/variations/service",
"//extensions/browser",
"//google_apis",
"//net",
"//net/traffic_annotation",
"//services/metrics/public/cpp:gen_ukm_builders",
"//services/network/public/cpp:cpp_base",
"//services/network/public/mojom",
"//third_party/icu:icuuc_public",
"//ui/aura",
"//ui/base",
"//ui/base:features",
"//ui/base/ime",
"//ui/chromeos/strings",
"//ui/display/manager",
"//ui/events:event_constants",
"//ui/gfx/geometry",
"//ui/ozone",
]
allow_circular_includes_from = [
"//chrome/browser/ash/input_method/japanese",
"//chrome/browser/ash/magic_boost",
]
}
static_library("test_support") {
testonly = true
sources = [
"mock_candidate_window_controller.cc",
"mock_candidate_window_controller.h",
"mock_input_method_engine.cc",
"mock_input_method_engine.h",
"stub_input_method_engine_observer.h",
"test_ime_controller.cc",
"test_ime_controller.h",
"textinput_test_helper.cc",
"textinput_test_helper.h",
]
public_deps = [
"//base",
"//chrome/browser/ash/input_method",
"//chrome/test:test_support_ui",
"//chromeos/ash/services/ime/public/cpp:structs",
"//ui/base/ime/ash",
]
deps = [
"//chrome/browser/ui",
"//content/test:test_support",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"assistive_input_denylist_unittest.cc",
"assistive_prefs_unittest.cc",
"assistive_suggester_client_filter_unittest.cc",
"assistive_suggester_unittest.cc",
"assistive_window_controller_unittest.cc",
"autocorrect_manager_unittest.cc",
"autocorrect_prefs_unittest.cc",
"diacritics_insensitive_string_comparator_unittest.cc",
"editor_config_factory_unittest.cc",
"editor_consent_store_unittest.cc",
"editor_context_unittest.cc",
"editor_feedback_unittest.cc",
"editor_mediator_unittest.cc",
"editor_metrics_recorder_unittest.cc",
"editor_panel_manager_unittest.cc",
"editor_switch_unittest.cc",
"emoji_suggester_unittest.cc",
"fake_suggestion_handler.cc",
"fake_suggestion_handler.h",
"grammar_manager_unittest.cc",
"grammar_service_client_unittest.cc",
"input_method_configuration_unittest.cc",
"input_method_engine_unittest.cc",
"input_method_manager_impl_unittest.cc",
"input_method_options_observer_unittest.cc",
"input_method_persistence_unittest.cc",
"input_method_quick_settings_helpers_unittest.cc",
"input_method_settings_unittest.cc",
"input_methods_by_language_unittest.cc",
"longpress_diacritics_suggester_unittest.cc",
"multi_word_suggester_unittest.cc",
"native_input_method_engine_observer_unittest.cc",
"native_input_method_engine_unittest.cc",
"pref_change_recorder_unittest.cc",
"screen_projection_change_monitor_unittest.cc",
"suggestions_collector_unittest.cc",
"suggestions_service_client_unittest.cc",
"text_utils_unittest.cc",
]
deps = [
":input_method",
"//ash",
"//ash:test_support",
"//ash/constants",
"//ash/public/cpp",
"//base",
"//base:i18n",
"//base/test:test_support",
"//chrome/app:generated_resources",
"//chrome/browser",
"//chrome/browser/ash/crosapi:browser_util",
"//chrome/browser/ash/input_method:test_support",
"//chrome/browser/ash/login/users:test_support",
"//chrome/browser/ash/settings:test_support",
"//chrome/browser/ui/ash",
"//chrome/browser/ui/ash/cast_config",
"//chrome/browser/ui/ash/input_method",
"//chrome/browser/ui/ash/keyboard",
"//chrome/browser/ui/ash/keyboard:ash_test_support",
"//chrome/common:channel_info",
"//chrome/common:constants",
"//chrome/common:non_code_constants",
"//chrome/test:test_support",
"//chrome/test:test_support_unit",
"//chromeos/ash/components/dbus/federated",
"//chromeos/ash/components/language_preferences",
"//chromeos/ash/services/federated/public/cpp",
"//chromeos/ash/services/federated/public/cpp:test_support",
"//chromeos/ash/services/ime/public/cpp:structs",
"//chromeos/ash/services/ime/public/mojom",
"//chromeos/components/kiosk:test_support",
"//chromeos/constants",
"//chromeos/services/machine_learning/public/cpp:stub",
"//chromeos/ui/base",
"//components/account_id",
"//components/autofill/core/browser",
"//components/autofill/core/browser:test_support",
"//components/feedback",
"//components/feedback/proto",
"//components/keyed_service/core",
"//components/prefs",
"//components/prefs:test_support",
"//components/session_manager/core",
"//components/signin/public/identity_manager:test_support",
"//components/spellcheck/browser",
"//components/spellcheck/common:spellcheck_result",
"//components/strings:components_strings",
"//components/sync_preferences:test_support",
"//components/ukm:test_support",
"//components/ukm/content",
"//components/user_manager",
"//components/user_manager:test_support",
"//content/test:test_support",
"//mojo/public/cpp/bindings",
"//net:test_support",
"//services/metrics/public/cpp:gen_ukm_builders",
"//services/metrics/public/cpp:metrics_cpp",
"//services/metrics/public/mojom",
"//services/network:test_support",
"//services/network/public/cpp",
"//testing/gmock",
"//testing/gtest",
"//third_party/icu:icui18n",
"//third_party/icu:icuuc_public",
"//ui/accessibility:ax_base",
"//ui/accessibility:ax_enums_mojo",
"//ui/aura",
"//ui/base",
"//ui/base:features",
"//ui/base:test_support",
"//ui/base/clipboard",
"//ui/base/clipboard:clipboard_types",
"//ui/base/ime:ime_types",
"//ui/base/ime:text_input_types",
"//ui/base/ime/ash",
"//ui/base/ime/init",
"//ui/chromeos/strings",
"//ui/display/manager",
"//ui/events",
"//ui/events:dom_keycode_converter",
"//ui/events:event_constants",
"//ui/events:events_base",
"//ui/events:test_support",
"//ui/events/types:headers",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gfx/range",
"//ui/views",
"//ui/views:test_support",
"//ui/wm",
"//url",
# Tests from subdirs:
"//chrome/browser/ash/input_method/japanese:unit_tests",
]
}
source_set("browser_tests") {
testonly = true
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
sources = [
"editor_system_actuator_browsertest.cc",
"input_method_engine_browsertests.cc",
"native_input_method_engine_with_ime_service_browsertest.cc",
"native_input_method_engine_without_ime_service_browsertest.cc",
"textinput_browsertest.cc",
"textinput_surroundingtext_browsertest.cc",
]
public_deps = [
"//base",
"//chrome/test:test_support_ui",
"//ui/base/ime",
"//ui/base/ime/init",
"//ui/gfx/geometry",
"//ui/gfx/range",
]
deps = [
"//ash/constants",
"//base/test:test_support",
"//build:branding_buildflags",
"//chrome/browser",
"//chrome/browser/ash/accessibility:test_support",
"//chrome/browser/ash/input_method",
"//chrome/browser/ash/input_method:test_support",
"//chrome/browser/profiles:profile",
"//chrome/browser/ui",
"//chrome/browser/ui/ash/input_method",
"//chrome/browser/ui/ash/keyboard",
"//chrome/common",
"//chrome/common:constants",
"//chrome/test:test_support",
"//chromeos/strings:strings_grit",
"//components/autofill/core/browser",
"//components/autofill/core/browser:test_support",
"//components/signin/public/identity_manager:test_support",
"//content/public/browser",
"//content/test:test_support",
"//extensions:test_support",
"//extensions/browser",
"//extensions/browser/api/virtual_keyboard_private",
"//extensions/browser/api/virtual_keyboard_private:virtual_keyboard_delegate",
"//extensions/common",
"//mojo/core/embedder",
"//testing/gtest",
"//ui/aura",
"//ui/base:test_support",
"//ui/base/ime:ime_types",
"//ui/base/ime:text_input_types",
"//ui/base/ime/ash",
"//ui/events",
"//ui/events:dom_keycode_converter",
"//ui/events:events_base",
"//ui/events:test_support",
"//ui/views:test_support",
]
}