| 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("//services/service_manager/public/service_manifest.gni") |
| 8 import("//testing/test.gni") | 8 import("//testing/test.gni") |
| 9 import("//tools/grit/grit_rule.gni") | 9 import("//tools/grit/grit_rule.gni") |
| 10 | 10 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 ] | 153 ] |
| 154 | 154 |
| 155 deps += [ ":jni_headers" ] | 155 deps += [ ":jni_headers" ] |
| 156 } | 156 } |
| 157 | 157 |
| 158 if (use_ozone) { | 158 if (use_ozone) { |
| 159 deps += [ "//ui/ozone" ] | 159 deps += [ "//ui/ozone" ] |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 | 162 |
| 163 # HOW THIS WORKS | |
| 164 # This target generates an "overlay" interface spec, allowing the Cast build to | 163 # This target generates an "overlay" interface spec, allowing the Cast build to |
| 165 # declare specific behavior and requirements for the "content_browser" service. | 164 # declare specific behavior and requirements for the "content_browser" service. |
| 166 # This is accomplished by generating a JSON file, which is packed into | 165 # This is accomplished by generating a JSON file, which is packed into |
| 167 # cast_shell.pak, and loaded at runtime. This can be used to: | 166 # cast_shell.pak, and loaded at runtime. This can be used to host addtional |
| 167 # interfaces in "content_browser". |
| 168 # | 168 # |
| 169 # 1) Host Cast-specific embedded services in the browser process. | 169 # NOTE: Do not add packaged_services here! packaged_services should instead be |
| 170 # To host an embedded service, add the service's name to the list of | 170 # added to "cast_content_packaged_services_manifest_overlay" below or |
| 171 # "packages" in this target, and add the target that generates that service's | 171 # its internal counterpart. Please see that target for more details. |
| 172 # manifest to "deps", like so: | |
| 173 # | |
| 174 # packages = [ "foo" ] | |
| 175 # deps = [ "//path/to/foo/service:foo_manifest" ] | |
| 176 # | |
| 177 # You must also register the "foo" service with the content client. See | |
| 178 # CastContentBrowserClient::RegisterInProcessServices() for details. | |
| 179 # | |
| 180 # **NOTE** | |
| 181 # If your service's manifest is in chromecast/internal, do not add it here! | |
| 182 # Instead, add the service to the internal counterpart, which is referenced | |
| 183 # below. | |
| 184 # | |
| 185 # 2) Host an addtional interface in "content_browser" via a ConnectionFilter. | |
| 186 # In this case, nothing need be added to this file. Add your interface to the | |
| 187 # "provides" field in cast_content_browser_manifest_overlay.json, and use | |
| 188 # CastContentBrowserClient::AddConnectionFilters() to register bindings to it | |
| 189 # for incoming connections. Remember to add the provided interfaces to the | |
| 190 # "requires" field in the manifest of the service that needs them. | |
| 191 # | |
| 192 service_manifest("cast_content_browser_manifest_overlay") { | 172 service_manifest("cast_content_browser_manifest_overlay") { |
| 193 source = "cast_content_browser_manifest_overlay.json" | 173 source = "cast_content_browser_manifest_overlay.json" |
| 194 packaged_services = [ "//media/mojo/services:media_manifest" ] | |
| 195 | 174 |
| 196 if (chromecast_branding != "public") { | 175 if (chromecast_branding != "public") { |
| 197 overlays = [ "//chromecast/internal/shell/browser:cast_content_browser_inter
nal_manifest_overlay" ] | 176 overlays = [ "//chromecast/internal/shell/browser:cast_content_browser_inter
nal_manifest_overlay" ] |
| 198 } | 177 } |
| 199 } | 178 } |
| 200 | 179 |
| 180 # This target is for packaged services that will run in the main (browser) |
| 181 # process. To host an embedded service, add the service's manifest target to the |
| 182 # list of "packaged_services" in this target, like so: |
| 183 # |
| 184 # package_services += [ "//path/to/foo/service:foo_manifest" ] |
| 185 # |
| 186 # You must also register the "foo" service with the content client. See |
| 187 # CastContentBrowserClient::RegisterInProcessServices() for details. |
| 188 # |
| 189 # NOTE: If your service's manifest is in chromecast/internal, do not add it |
| 190 # here! Instead, add the service to the internal counterpart, which is |
| 191 # referenced below. |
| 192 service_manifest("cast_content_packaged_services_manifest_overlay") { |
| 193 source = "cast_content_packaged_services_manifest_overlay.json" |
| 194 |
| 195 packaged_services = [ "//media/mojo/services:media_manifest" ] |
| 196 |
| 197 if (chromecast_branding != "public") { |
| 198 overlays = [ "//chromecast/internal/shell/browser:cast_content_packaged_serv
ices_internal_manifest_overlay" ] |
| 199 } |
| 200 } |
| 201 |
| 201 grit("resources") { | 202 grit("resources") { |
| 202 visibility = [ | 203 visibility = [ |
| 203 ":browser", | 204 ":browser", |
| 204 "//chromecast:cast_shell_pak", | 205 "//chromecast:cast_shell_pak", |
| 205 ] | 206 ] |
| 206 source = "cast_browser_resources.grd" | 207 source = "cast_browser_resources.grd" |
| 207 use_qualified_include = true | 208 use_qualified_include = true |
| 208 output_dir = "$root_gen_dir/chromecast/browser" | 209 output_dir = "$root_gen_dir/chromecast/browser" |
| 209 outputs = [ | 210 outputs = [ |
| 210 "grit/cast_browser_resources.h", | 211 "grit/cast_browser_resources.h", |
| 211 "cast_browser_resources.pak", | 212 "cast_browser_resources.pak", |
| 212 ] | 213 ] |
| 213 | 214 |
| 214 deps = [ | 215 deps = [ |
| 215 ":cast_content_browser_manifest_overlay", | 216 ":cast_content_browser_manifest_overlay", |
| 217 ":cast_content_packaged_services_manifest_overlay", |
| 216 ] | 218 ] |
| 217 } | 219 } |
| 218 | 220 |
| 219 source_set("test_support") { | 221 source_set("test_support") { |
| 220 testonly = true | 222 testonly = true |
| 221 sources = [ | 223 sources = [ |
| 222 "test/cast_browser_test.cc", | 224 "test/cast_browser_test.cc", |
| 223 "test/cast_browser_test.h", | 225 "test/cast_browser_test.h", |
| 224 ] | 226 ] |
| 225 | 227 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 "android/apk/src/org/chromium/chromecast/shell/CastContentWindowAndroid.ja
va", | 282 "android/apk/src/org/chromium/chromecast/shell/CastContentWindowAndroid.ja
va", |
| 281 "android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java", | 283 "android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java", |
| 282 "android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java", | 284 "android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java", |
| 283 "android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java", | 285 "android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java", |
| 284 "android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.jav
a", | 286 "android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.jav
a", |
| 285 ] | 287 ] |
| 286 | 288 |
| 287 jni_package = "chromecast" | 289 jni_package = "chromecast" |
| 288 } | 290 } |
| 289 } | 291 } |
| OLD | NEW |