blob: 3bfbf5da1cec24cfbdecf9d93e893ce3b39e7c2a [file] [log] [blame]
Avi Drissman8ba1bad2022-09-13 19:22:361# Copyright 2014 The Chromium Authors
[email protected]b9f4c682014-07-10 22:00:372# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
Max Curran9a3e7bf2020-10-16 20:17:184if (is_android) {
5 import("//build/config/android/rules.gni")
6}
[email protected]b9f4c682014-07-10 22:00:377
brettw60ac5582016-07-22 17:23:548static_library("common") {
[email protected]b9f4c682014-07-10 22:00:379 sources = [
10 "language_detection_details.cc",
11 "language_detection_details.h",
12 "translate_constants.cc",
13 "translate_constants.h",
14 "translate_errors.h",
15 "translate_metrics.cc",
16 "translate_metrics.h",
[email protected]b9f4c682014-07-10 22:00:3717 "translate_switches.cc",
18 "translate_switches.h",
19 "translate_util.cc",
20 "translate_util.h",
21 ]
22
23 deps = [
24 "//base",
Claudio Magnie0a80bb2018-01-31 02:52:5825 "//components/language/core/common",
Fergal Daly104c544f2025-01-06 07:52:2326 "//components/language_detection/core:core",
Steven Holtef9d5ed62017-10-21 02:02:3027 "//third_party/metrics_proto",
[email protected]b9f4c682014-07-10 22:00:3728 "//url",
29 ]
30}
Brett Wilson817fec02015-08-22 20:36:4931
32source_set("unit_tests") {
33 testonly = true
34 sources = [
35 "translate_metrics_unittest.cc",
36 "translate_util_unittest.cc",
37 ]
38 deps = [
39 ":common",
brettw3ceb2d9e2015-10-16 05:33:0540 "//base",
Brett Wilson817fec02015-08-22 20:36:4941 "//testing/gtest",
Steven Holtef9d5ed62017-10-21 02:02:3042 "//third_party/metrics_proto",
brettw3ceb2d9e2015-10-16 05:33:0543 "//url",
Brett Wilson817fec02015-08-22 20:36:4944 ]
45}
Max Curran9a3e7bf2020-10-16 20:17:1846
47if (is_android) {
48 java_cpp_enum("translate_infobar_event_enum") {
Trevor Perrier0e8247a2023-09-28 19:53:5449 sources = [ "translate_metrics.h" ]
Max Curran9a3e7bf2020-10-16 20:17:1850 }
51
52 android_library("translate_infobar_event_enum_java") {
Peter Kotwicz04093722021-02-13 00:35:3753 deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
Max Curran9a3e7bf2020-10-16 20:17:1854
55 srcjar_deps = [ ":translate_infobar_event_enum" ]
56 }
57}