blob: 331440e37a0e4aee6ee2b3e50ba770bbe2f9f42d [file] [log] [blame]
Scott Violet63553fe2020-06-09 16:59:251# Copyright 2020 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//mojo/public/tools/bindings/mojom.gni")
6
7mojom("common_mojom") {
8 sources = [
9 "aw_origin_matcher.mojom",
10 "interfaces.mojom",
11 ]
12
13 public_deps = [
14 "//mojo/public/mojom/base",
15 "//third_party/blink/public/mojom:mojom_core",
16 ]
17
18 cpp_typemaps = [
19 {
20 types = [
21 {
22 mojom = "js_injection.mojom.AwOriginMatcher"
23 cpp = "::js_injection::AwOriginMatcher"
24 },
Scott Violetd61b7cf2020-06-11 22:15:0525 {
26 mojom = "js_injection.mojom.OriginMatcherRule"
27 cpp = "::std::unique_ptr<::js_injection::OriginMatcherRule>"
28 move_only = true
29 },
Scott Violet63553fe2020-06-09 16:59:2530 ]
31 traits_headers = [ "aw_origin_matcher_mojom_traits.h" ]
Scott Violetd61b7cf2020-06-11 22:15:0532 traits_sources = [ "aw_origin_matcher_mojom_traits.cc" ]
33 traits_public_deps = [ ":common" ]
Scott Violet63553fe2020-06-09 16:59:2534 },
35 ]
Scott Violetd61b7cf2020-06-11 22:15:0536 overridden_deps = [ "//third_party/blink/public/mojom:mojom_core" ]
37 component_deps = [ "//third_party/blink/public/common" ]
Scott Violet63553fe2020-06-09 16:59:2538}
39
40source_set("common") {
Scott Violetd61b7cf2020-06-11 22:15:0541 public = [ "aw_origin_matcher.h" ]
Scott Violet63553fe2020-06-09 16:59:2542 sources = [
43 "aw_origin_matcher.cc",
Scott Violetd61b7cf2020-06-11 22:15:0544 "origin_matcher_internal.cc",
45 "origin_matcher_internal.h",
Scott Violet63553fe2020-06-09 16:59:2546 ]
47 deps = [
48 "//base",
49 "//net",
50 "//url",
51 ]
Scott Violetd61b7cf2020-06-11 22:15:0552
53 # origin_matcher_internal is needed by mojom traits and tests.
54 friend = [ ":*" ]
Scott Violet63553fe2020-06-09 16:59:2555}
56
57source_set("unit_tests") {
58 testonly = true
59 sources = [ "aw_origin_matcher_unittest.cc" ]
60 deps = [
61 ":common",
Scott Violetd61b7cf2020-06-11 22:15:0562 ":common_mojom",
Scott Violet63553fe2020-06-09 16:59:2563 "//base",
64 "//base/test:test_support",
Scott Violetd61b7cf2020-06-11 22:15:0565 "//mojo/public/cpp/test_support:test_utils",
Scott Violet63553fe2020-06-09 16:59:2566 "//url",
67 ]
68}