chromium/ios/chrome/browser/voice/model/BUILD.gn

# 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("model") {
  sources = [
    "speech_input_locale.h",
    "speech_input_locale_config.h",
    "speech_input_locale_config.mm",
    "speech_input_locale_config_impl.h",
    "speech_input_locale_config_impl.mm",
    "speech_input_locale_match.h",
    "speech_input_locale_match.mm",
    "voice_search_navigations_tab_helper.h",
    "voice_search_navigations_tab_helper.mm",
  ]

  deps = [
    ":voice_search_language",
    "//base",
    "//components/pref_registry",
    "//components/prefs",
    "//ios/public/provider/chrome/browser/voice_search:voice_search_api",
  ]

  public_deps = [ "//ios/web/public" ]
}

source_set("voice_search_language") {
  sources = [
    "voice_search_language.h",
    "voice_search_language.mm",
  ]
}

source_set("prefs") {
  sources = [
    "voice_search_prefs.h",
    "voice_search_prefs_registration.cc",
    "voice_search_prefs_registration.h",
  ]

  deps = [
    "//components/pref_registry",
    "//components/prefs",
  ]
}

source_set("tts") {
  sources = [
    "text_to_speech_listener.h",
    "text_to_speech_listener.mm",
    "text_to_speech_parser.h",
    "text_to_speech_parser.mm",
    "voice_search_url_rewriter.h",
    "voice_search_url_rewriter.mm",
  ]

  deps = [
    ":model",
    ":prefs",
    "//base",
    "//components/google/core/common",
    "//components/prefs",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/web/public",
    "//ios/web/public/js_messaging:js_messaging",
    "//net",
    "//url",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "speech_input_locale_config_impl_unittest.mm",
    "text_to_speech_listener_unittest.mm",
    "text_to_speech_parser_unittest.mm",
    "voice_search_navigations_tab_helper_unittest.mm",
  ]

  deps = [
    ":model",
    ":tts",
    "//base",
    "//base/test:test_support",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/web/common",
    "//ios/web/public/test",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/ocmock",
  ]
}