# Copyright 2015 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.

source_set("voice") {
  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_config.h",
    "speech_input_locale_match_config.mm",
  ]

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

  public_deps = [
    "//base",
    "//ios/public/provider/chrome/browser",
  ]
}

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

  deps = [
    "//components/pref_registry",
    "//components/prefs",
    "//ios/public/provider/chrome/browser",
  ]
}

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 = [
    ":voice",
    "//base",
    "//components/google/core/browser",
    "//components/prefs",
    "//ios/chrome/browser",
    "//ios/chrome/browser/browser_state",
    "//ios/public/provider/chrome/browser",
    "//ios/web",
    "//net",
    "//third_party/google_toolbox_for_mac",
    "//url",
  ]
}

source_set("unit_tests") {
  testonly = true

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

  deps = [
    "//base",
    "//ios/web",
    "//ios/web:test_support",
    "//testing/gtest",
    "//third_party/google_toolbox_for_mac",
  ]

  public_deps = [
    ":tts",
  ]
}
