OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 # | 4 # |
5 import("//testing/test.gni") | 5 import("//testing/test.gni") |
6 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") | 6 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") |
7 | 7 |
8 gypi_values = exec_script("//build/gypi_to_gn.py", | 8 source_set("router") { |
9 [ rebase_path("media_router.gypi") ], | 9 deps = [ |
10 "scope", | 10 ":router_core", |
11 [ "media_router.gypi" ]) | 11 ] |
| 12 } |
12 | 13 |
13 # TODO(mfoltz): Fix problem that requires explicitly listing //skia | 14 source_set("router_core") { |
14 source_set("router") { | |
15 deps = [ | 15 deps = [ |
16 ":mojo_bindings", | 16 ":mojo_bindings", |
17 "//base", | 17 "//base", |
18 "//extensions/browser", | |
19 "//components/keyed_service/core", | 18 "//components/keyed_service/core", |
20 "//third_party/mojo/src/mojo/public/cpp/bindings", | 19 "//third_party/mojo/src/mojo/public/cpp/bindings", |
21 "//skia", | |
22 "//url", | 20 "//url", |
23 ] | 21 ] |
24 sources = rebase_path(gypi_values.media_router_sources, | 22 sources = [ |
25 ".", | 23 "create_session_request.cc", |
26 "//chrome/browser/media/router") | 24 "create_session_request.h", |
| 25 "issue.cc", |
| 26 "issue.h", |
| 27 "issue_manager.cc", |
| 28 "issue_manager.h", |
| 29 "issues_observer.h", |
| 30 "media_route.cc", |
| 31 "media_route.h", |
| 32 "media_route_id.h", |
| 33 "media_router.h", |
| 34 "media_router_type_converters.cc", |
| 35 "media_router_type_converters.h", |
| 36 "media_routes_observer.cc", |
| 37 "media_routes_observer.h", |
| 38 "media_sink.cc", |
| 39 "media_sink.h", |
| 40 "media_sinks_observer.cc", |
| 41 "media_sinks_observer.h", |
| 42 "media_source.cc", |
| 43 "media_source.h", |
| 44 "media_source_helper.cc", |
| 45 "media_source_helper.h", |
| 46 "presentation_media_sinks_observer.cc", |
| 47 "presentation_media_sinks_observer.h", |
| 48 "route_id_manager.cc", |
| 49 "route_id_manager.h", |
| 50 ] |
| 51 } |
| 52 |
| 53 source_set("unit_tests") { |
| 54 testonly = true |
| 55 deps = [ |
| 56 ":router_core", |
| 57 ":unit_tests_support", |
| 58 "//base/test:test_support", |
| 59 "//chrome/test:test_support", |
| 60 "//testing/gmock", |
| 61 "//testing/gtest", |
| 62 "//third_party/cld_2:cld2_static", |
| 63 "//third_party/mojo/src/mojo/public/cpp/bindings", |
| 64 ] |
| 65 sources = [ |
| 66 "media_route_unittest.cc", |
| 67 "media_router_type_converters_unittest.cc", |
| 68 "media_sink_unittest.cc", |
| 69 "media_source_unittest.cc", |
| 70 "presentation_media_sinks_observer_unittest.cc", |
| 71 "route_id_manager_unittest.cc", |
| 72 ] |
| 73 } |
| 74 |
| 75 source_set("unit_tests_support") { |
| 76 testonly = true |
| 77 deps = [ |
| 78 ":router_core", |
| 79 "//testing/gmock", |
| 80 ] |
| 81 sources = [ |
| 82 "mock_media_router.cc", |
| 83 "mock_media_router.h", |
| 84 "mock_screen_availability_listener.cc", |
| 85 "mock_screen_availability_listener.h", |
| 86 ] |
27 } | 87 } |
28 | 88 |
29 mojom("mojo_bindings") { | 89 mojom("mojo_bindings") { |
30 sources = [ | 90 sources = [ |
31 "media_router.mojom", | 91 "media_router.mojom", |
32 ] | 92 ] |
33 } | 93 } |
34 | 94 |
35 source_set("test_support") { | 95 # Optional standalone test binary, for faster isolated builds. |
36 testonly = true | 96 test("unit_tests_main") { |
37 deps = [ | 97 deps = [ |
38 ":mojo_bindings", | 98 ":unit_tests", |
39 ":router", | 99 "//testing/gmock:gmock_main", |
40 "//chrome/test:test_support", | |
41 "//testing/gmock", | |
42 ] | 100 ] |
43 sources = rebase_path(gypi_values.media_router_test_support_sources, | 101 sources = [ |
44 ".", | 102 ":unittest_files", |
45 "//chrome/browser/media/router") | 103 ] |
46 } | 104 } |
OLD | NEW |