summaryrefslogtreecommitdiff
path: root/chromium/components/translate/ios/browser/BUILD.gn
blob: 4b591a8e95b3d88eeb7c4f13b048d61cffba0441 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# 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.

import("//ios/web/js_compile.gni")

source_set("browser") {
  configs += [ "//build/config/compiler:enable_arc" ]
  sources = [
    "ios_translate_driver.h",
    "ios_translate_driver.mm",
    "js_language_detection_manager.h",
    "js_language_detection_manager.mm",
    "js_translate_manager.h",
    "js_translate_manager.mm",
    "language_detection_controller.h",
    "language_detection_controller.mm",
    "string_clipping_util.cc",
    "string_clipping_util.h",
    "translate_controller.h",
    "translate_controller.mm",
  ]

  deps = [
    ":injected_js",
    "//base",
    "//components/language/ios/browser",
    "//components/prefs",
    "//components/translate/core/browser",
    "//components/translate/core/common",
    "//components/translate/core/language_detection",
    "//components/ukm/ios:ukm_url_recorder",
    "//ios/web/common",
    "//ios/web/public",
    "//ios/web/public/deprecated",
    "//ios/web/public/js_messaging",
    "//net",
    "//net/traffic_annotation:traffic_annotation",
    "//services/network/public/cpp:cpp_base",
    "//ui/base",
    "//url",
  ]
}

js_compile_checked("injected_js") {
  visibility = [ ":browser" ]
  sources = [
    "resources/language_detection.js",
    "resources/translate_ios.js",
  ]
}

source_set("unit_tests") {
  configs += [ "//build/config/compiler:enable_arc" ]
  testonly = true
  sources = [
    "js_translate_manager_unittest.mm",
    "language_detection_controller_unittest.mm",
    "string_clipping_util_unittest.cc",
    "translate_controller_unittest.mm",
  ]

  deps = [
    ":browser",
    "//base",
    "//base/test:test_support",
    "//components/language/ios/browser",
    "//components/prefs:test_support",
    "//components/resources",
    "//components/translate/core/browser",
    "//components/translate/core/common",
    "//ios/web/public/deprecated:test_doubles",
    "//ios/web/public/test",
    "//net:net",
    "//testing/gtest",
    "//third_party/ocmock",
    "//ui/base",
    "//url",
  ]
}