Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: chromecast/browser/BUILD.gn

Issue 2562393005: [Chromecast] Reference internal services manifest. (Closed)
Patch Set: No content/ changes Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromecast/browser/cast_browser_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/BUILD.gn
diff --git a/chromecast/browser/BUILD.gn b/chromecast/browser/BUILD.gn
index 2897c93aa602c6941ebdfbed1c06d2b9b9d14d38..b410082c1cb15ec526dc88bc4b1cd91184fa29e3 100644
--- a/chromecast/browser/BUILD.gn
+++ b/chromecast/browser/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/ui.gni")
import("//chromecast/chromecast.gni")
+import("//services/service_manager/public/service_manifest.gni")
import("//testing/test.gni")
import("//tools/grit/grit_rule.gni")
@@ -143,6 +144,51 @@ source_set("browser") {
}
}
+# HOW THIS WORKS
+# This target generates an "overlay" interface spec, allowing the Cast build to
+# declare specific behavior and requirements for the "content_browser" service.
+# This is accomplished by generating a JSON file, which is packed into
+# cast_shell.pak, and loaded at runtime. This can be used to:
+#
+# 1) Host Cast-specific embedded services in the browser process.
+# To host an embedded service, add the service's name to the list of
+# "packages" in this target, and add the target that generates that service's
+# manifest to "deps", like so:
+#
+# packages = [ "foo" ]
+# deps = [ "//path/to/foo/service:foo_manifest" ]
+#
+# You must also register the "foo" service with the content client. See
+# CastContentBrowserClient::RegisterInProcessServices() for details.
+#
+# **NOTE**
+# If your service's manifest is in chromecast/internal, do not add it here!
+# Instead, add the service to the internal counterpart, which is referenced
+# below.
+#
+# 2) Host an addtional interface in "content_browser" via a ConnectionFilter.
+# In this case, nothing need be added to this file. Add your interface to the
+# "provides" field in cast_content_browser_manifest_overlay.json, and use
+# CastContentBrowserClient::AddConnectionFilters() to register bindings to it
+# for incoming connections. Remember to add the provided interfaces to the
+# "requires" field in the manifest of the service that needs them.
+#
+service_manifest_overlay("cast_content_browser_manifest_overlay") {
+ source = "cast_content_browser_manifest_overlay.json"
+
+ packaged_services = [ "media" ]
alokp 2016/12/19 21:45:00 since you are not changing content manifest, this
slan 2016/12/19 22:14:04 It's not necessary, but I would like to keep it be
+
+ deps = [
+ "//media/mojo/services:media_manifest",
+ ]
+
+ if (chromecast_branding != "public") {
+ overlays = [ "${root_gen_dir}/cast_content_browser_internal_manifest_overlay.json" ]
+
+ deps += [ "//chromecast/internal/shell/browser:cast_content_browser_internal_manifest_overlay" ]
alokp 2016/12/19 21:45:00 Not related to this patch, but I find it weird tha
slan 2016/12/19 22:14:04 Unfortunately, no. In GN, there is not a really
+ }
+}
+
grit("resources") {
visibility = [
":browser",
@@ -155,6 +201,10 @@ grit("resources") {
"grit/cast_browser_resources.h",
"cast_browser_resources.pak",
]
+
+ deps = [
+ ":cast_content_browser_manifest_overlay",
+ ]
}
source_set("test_support") {
« no previous file with comments | « no previous file | chromecast/browser/cast_browser_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698