| 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 = [ |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 9 | "interfaces.mojom", |
| Scott Violet | 9343e64 | 2020-06-12 18:47:21 | [diff] [blame] | 10 | "origin_matcher.mojom", |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 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 | { |
| Scott Violet | 9343e64 | 2020-06-12 18:47:21 | [diff] [blame] | 22 | mojom = "js_injection.mojom.OriginMatcher" |
| 23 | cpp = "::js_injection::OriginMatcher" |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 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 | ] |
| Scott Violet | 9343e64 | 2020-06-12 18:47:21 | [diff] [blame] | 31 | traits_headers = [ |
| 32 | "origin_matcher_mojom_traits.h", |
| 33 | "origin_matcher.h", |
| 34 | ] |
| 35 | traits_sources = [ "origin_matcher_mojom_traits.cc" ] |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame] | 36 | traits_public_deps = [ ":common" ] |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 37 | }, |
| 38 | ] |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame] | 39 | overridden_deps = [ "//third_party/blink/public/mojom:mojom_core" ] |
| 40 | component_deps = [ "//third_party/blink/public/common" ] |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | source_set("common") { |
| Scott Violet | 9343e64 | 2020-06-12 18:47:21 | [diff] [blame] | 44 | public = [ "origin_matcher.h" ] |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 45 | sources = [ |
| Scott Violet | 9343e64 | 2020-06-12 18:47:21 | [diff] [blame] | 46 | "origin_matcher.cc", |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame] | 47 | "origin_matcher_internal.cc", |
| 48 | "origin_matcher_internal.h", |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 49 | ] |
| 50 | deps = [ |
| 51 | "//base", |
| 52 | "//net", |
| 53 | "//url", |
| 54 | ] |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame] | 55 | |
| 56 | # origin_matcher_internal is needed by mojom traits and tests. |
| 57 | friend = [ ":*" ] |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | source_set("unit_tests") { |
| 61 | testonly = true |
| Scott Violet | 9343e64 | 2020-06-12 18:47:21 | [diff] [blame] | 62 | sources = [ "origin_matcher_unittest.cc" ] |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 63 | deps = [ |
| 64 | ":common", |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame] | 65 | ":common_mojom", |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 66 | "//base", |
| 67 | "//base/test:test_support", |
| Scott Violet | d61b7cf | 2020-06-11 22:15:05 | [diff] [blame] | 68 | "//mojo/public/cpp/test_support:test_utils", |
| Scott Violet | 63553fe | 2020-06-09 16:59:25 | [diff] [blame] | 69 | "//url", |
| 70 | ] |
| 71 | } |