| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 1 | # 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 | |
| 5 | import("//mojo/public/tools/bindings/mojom.gni") |
| 6 | |
| 7 | mojom("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 Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame^] | 25 | { |
| 26 | mojom = "js_injection.mojom.OriginMatcherRule" |
| 27 | cpp = "::std::unique_ptr<::js_injection::OriginMatcherRule>" |
| 28 | move_only = true |
| 29 | }, |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 30 | ] |
| 31 | traits_headers = [ "aw_origin_matcher_mojom_traits.h" ] |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame^] | 32 | traits_sources = [ "aw_origin_matcher_mojom_traits.cc" ] |
| 33 | traits_public_deps = [ ":common" ] |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 34 | }, |
| 35 | ] |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame^] | 36 | overridden_deps = [ "//third_party/blink/public/mojom:mojom_core" ] |
| 37 | component_deps = [ "//third_party/blink/public/common" ] |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | source_set("common") { |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame^] | 41 | public = [ "aw_origin_matcher.h" ] |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 42 | sources = [ |
| 43 | "aw_origin_matcher.cc", |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame^] | 44 | "origin_matcher_internal.cc", |
| 45 | "origin_matcher_internal.h", |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 46 | ] |
| 47 | deps = [ |
| 48 | "//base", |
| 49 | "//net", |
| 50 | "//url", |
| 51 | ] |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame^] | 52 | |
| 53 | # origin_matcher_internal is needed by mojom traits and tests. |
| 54 | friend = [ ":*" ] |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | source_set("unit_tests") { |
| 58 | testonly = true |
| 59 | sources = [ "aw_origin_matcher_unittest.cc" ] |
| 60 | deps = [ |
| 61 | ":common", |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame^] | 62 | ":common_mojom", |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 63 | "//base", |
| 64 | "//base/test:test_support", |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame^] | 65 | "//mojo/public/cpp/test_support:test_utils", |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 66 | "//url", |
| 67 | ] |
| 68 | } |