summaryrefslogtreecommitdiff
path: root/chromium/ios/web/common/BUILD.gn
blob: 338bac02fabed6d4423f824c4df1dcabd4a2832f (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Copyright 2019 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/build/config.gni")

source_set("common") {
  sources = [
    "crw_content_view.h",
    "crw_viewport_adjustment.h",
    "crw_viewport_adjustment_container.h",
    "crw_web_view_content_view.h",
    "crw_web_view_content_view.mm",
    "referrer_util.cc",
    "referrer_util.h",
    "url_scheme_util.h",
    "url_scheme_util.mm",
    "url_util.cc",
    "url_util.h",
  ]

  deps = [
    "//base",
    "//ios/third_party/webkit",
    "//ios/web/public/navigation",
    "//net",
    "//services/network/public/cpp",
    "//url",
  ]

  public_deps = [ ":features" ]

  libs = [ "UIKit.framework" ]

  configs += [ "//build/config/compiler:enable_arc" ]
}

source_set("features") {
  deps = [ "//base" ]
  sources = [
    "features.h",
    "features.mm",
  ]
  configs += [ "//build/config/compiler:enable_arc" ]
}

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

  deps = [
    ":user_agent",
    "//base",
    "//ios/web/web_state:web_view_internal_creation_util",
    "//ios/web/web_state/ui:wk_web_view_configuration_provider",
  ]

  libs = [ "UIKit.framework" ]

  configs += [ "//build/config/compiler:enable_arc" ]
}

# This is a separate target as it is used by Cronet.
source_set("user_agent") {
  deps = [
    ":features",
    "//base",
  ]

  sources = [
    "user_agent.h",
    "user_agent.mm",
  ]

  configs += [ "//build/config/compiler:enable_arc" ]
}

source_set("unittests") {
  configs += [ "//build/config/compiler:enable_arc" ]
  testonly = true
  deps = [
    ":common",
    ":user_agent",
    "//base",
    "//base/test:test_support",
    "//ios/web/public/navigation",
    "//net",
    "//testing/gtest",
    "//third_party/ocmock",
    "//ui/base",
    "//url",
  ]

  sources = [
    "referrer_util_unittest.cc",
    "url_scheme_util_unittest.mm",
    "url_util_unittest.cc",
    "user_agent_unittest.mm",
  ]
}