| 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("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
| 6 import("//chromecast/chromecast.gni") | 6 import("//chromecast/chromecast.gni") |
| 7 import("//services/service_manager/public/service_manifest.gni") |
| 7 import("//testing/test.gni") | 8 import("//testing/test.gni") |
| 8 import("//tools/grit/grit_rule.gni") | 9 import("//tools/grit/grit_rule.gni") |
| 9 | 10 |
| 10 if (is_android) { | 11 if (is_android) { |
| 11 import("//build/config/android/rules.gni") | 12 import("//build/config/android/rules.gni") |
| 12 } | 13 } |
| 13 | 14 |
| 14 source_set("browser") { | 15 source_set("browser") { |
| 15 sources = [ | 16 sources = [ |
| 16 "android/cast_window_android.cc", | 17 "android/cast_window_android.cc", |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 ] | 137 ] |
| 137 } else if (is_android) { | 138 } else if (is_android) { |
| 138 deps += [ ":jni_headers" ] | 139 deps += [ ":jni_headers" ] |
| 139 } | 140 } |
| 140 | 141 |
| 141 if (use_ozone) { | 142 if (use_ozone) { |
| 142 deps += [ "//ui/ozone" ] | 143 deps += [ "//ui/ozone" ] |
| 143 } | 144 } |
| 144 } | 145 } |
| 145 | 146 |
| 147 # HOW THIS WORKS |
| 148 # This target generates an "overlay" interface spec, allowing the Cast build to |
| 149 # declare specific behavior and requirements for the "content_browser" service. |
| 150 # This is accomplished by generating a JSON file, which is packed into |
| 151 # cast_shell.pak, and loaded at runtime. This can be used to: |
| 152 # |
| 153 # 1) Host Cast-specific embedded services in the browser process. |
| 154 # To host an embedded service, add the service's name to the list of |
| 155 # "packages" in this target, and add the target that generates that service's |
| 156 # manifest to "deps", like so: |
| 157 # |
| 158 # packages = [ "foo" ] |
| 159 # deps = [ "//path/to/foo/service:foo_manifest" ] |
| 160 # |
| 161 # You must also register the "foo" service with the content client. See |
| 162 # CastContentBrowserClient::RegisterInProcessServices() for details. |
| 163 # |
| 164 # **NOTE** |
| 165 # If your service's manifest is in chromecast/internal, do not add it here! |
| 166 # Instead, add the service to the internal counterpart, which is referenced |
| 167 # below. |
| 168 # |
| 169 # 2) Host an addtional interface in "content_browser" via a ConnectionFilter. |
| 170 # In this case, nothing need be added to this file. Add your interface to the |
| 171 # "provides" field in cast_content_browser_manifest_overlay.json, and use |
| 172 # CastContentBrowserClient::AddConnectionFilters() to register bindings to it |
| 173 # for incoming connections. Remember to add the provided interfaces to the |
| 174 # "requires" field in the manifest of the service that needs them. |
| 175 # |
| 176 service_manifest_overlay("cast_content_browser_manifest_overlay") { |
| 177 source = "cast_content_browser_manifest_overlay.json" |
| 178 |
| 179 packaged_services = [ "media" ] |
| 180 |
| 181 deps = [ |
| 182 "//media/mojo/services:media_manifest", |
| 183 ] |
| 184 |
| 185 if (chromecast_branding != "public") { |
| 186 overlays = [ "${root_gen_dir}/cast_content_browser_internal_manifest_overlay
.json" ] |
| 187 |
| 188 deps += [ "//chromecast/internal/shell/browser:cast_content_browser_internal
_manifest_overlay" ] |
| 189 } |
| 190 } |
| 191 |
| 146 grit("resources") { | 192 grit("resources") { |
| 147 visibility = [ | 193 visibility = [ |
| 148 ":browser", | 194 ":browser", |
| 149 "//chromecast:cast_shell_pak", | 195 "//chromecast:cast_shell_pak", |
| 150 ] | 196 ] |
| 151 source = "cast_browser_resources.grd" | 197 source = "cast_browser_resources.grd" |
| 152 use_qualified_include = true | 198 use_qualified_include = true |
| 153 output_dir = "$root_gen_dir/chromecast/browser" | 199 output_dir = "$root_gen_dir/chromecast/browser" |
| 154 outputs = [ | 200 outputs = [ |
| 155 "grit/cast_browser_resources.h", | 201 "grit/cast_browser_resources.h", |
| 156 "cast_browser_resources.pak", | 202 "cast_browser_resources.pak", |
| 157 ] | 203 ] |
| 204 |
| 205 deps = [ |
| 206 ":cast_content_browser_manifest_overlay", |
| 207 ] |
| 158 } | 208 } |
| 159 | 209 |
| 160 source_set("test_support") { | 210 source_set("test_support") { |
| 161 testonly = true | 211 testonly = true |
| 162 sources = [ | 212 sources = [ |
| 163 "test/cast_browser_test.cc", | 213 "test/cast_browser_test.cc", |
| 164 "test/cast_browser_test.h", | 214 "test/cast_browser_test.h", |
| 165 ] | 215 ] |
| 166 | 216 |
| 167 public_deps = [ | 217 public_deps = [ |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 "android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java", | 267 "android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java", |
| 218 "android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java", | 268 "android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java", |
| 219 "android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java", | 269 "android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java", |
| 220 "android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java", | 270 "android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java", |
| 221 "android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java", | 271 "android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java", |
| 222 ] | 272 ] |
| 223 | 273 |
| 224 jni_package = "chromecast" | 274 jni_package = "chromecast" |
| 225 } | 275 } |
| 226 } | 276 } |
| OLD | NEW |