| 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", |
| 9 [ rebase_path("media_router.gypi") ], |
| 10 "scope", |
| 11 [ "media_router.gypi" ]) |
| 12 |
| 13 # TODO(mfoltz): Fix problem that requires explicitly listing //skia |
| 8 source_set("router") { | 14 source_set("router") { |
| 9 deps = [ | 15 deps = [ |
| 10 ":router_core", | |
| 11 ] | |
| 12 } | |
| 13 | |
| 14 source_set("router_core") { | |
| 15 deps = [ | |
| 16 ":mojo_bindings", | 16 ":mojo_bindings", |
| 17 "//base", | 17 "//base", |
| 18 "//extensions/browser", |
| 18 "//components/keyed_service/core", | 19 "//components/keyed_service/core", |
| 19 "//third_party/mojo/src/mojo/public/cpp/bindings", | 20 "//third_party/mojo/src/mojo/public/cpp/bindings", |
| 21 "//skia", |
| 20 "//url", | 22 "//url", |
| 21 ] | 23 ] |
| 22 sources = [ | 24 sources = rebase_path(gypi_values.media_router_sources, |
| 23 "create_session_request.cc", | 25 ".", |
| 24 "create_session_request.h", | 26 "//chrome/browser/media/router") |
| 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 ] | |
| 87 } | 27 } |
| 88 | 28 |
| 89 mojom("mojo_bindings") { | 29 mojom("mojo_bindings") { |
| 90 sources = [ | 30 sources = [ |
| 91 "media_router.mojom", | 31 "media_router.mojom", |
| 92 ] | 32 ] |
| 93 } | 33 } |
| 94 | 34 |
| 95 # Optional standalone test binary, for faster isolated builds. | 35 source_set("test_support") { |
| 96 test("unit_tests_main") { | 36 testonly = true |
| 97 deps = [ | 37 deps = [ |
| 98 ":unit_tests", | 38 ":mojo_bindings", |
| 99 "//testing/gmock:gmock_main", | 39 ":router", |
| 40 "//chrome/test:test_support", |
| 41 "//testing/gmock", |
| 100 ] | 42 ] |
| 101 sources = [ | 43 sources = rebase_path(gypi_values.media_router_test_support_sources, |
| 102 ":unittest_files", | 44 ".", |
| 103 ] | 45 "//chrome/browser/media/router") |
| 104 } | 46 } |
| OLD | NEW |