[go: nahoru, domu]

Preliminary patch to enable extensions for cast_shell

This ports most of the app_shell (extensions/shell) environment into
cast_shell. All changes are gated on enable_extensions=true

Guest views are part of the extension framework. Chrome has what they call
app_shell, which is content_shell + extensions.

This change starts to pull in what we need from app_shell into cast_shell.

From explorations, it looked like the most practical way to approach this
is to bring in extension framework instead of trying to cherry-pick
specific parts as that code is fairly deeply intertwined in Chrome
and would be hard to garden.

Once compiled it should only leave the parts we need anyway.

Bug: b/70571389
Test: manual with Browser Sample hosted on localhost
Change-Id: Id585fe76cbca5d8635082d5210765705e78ab23c
Reviewed-on: https://chromium-review.googlesource.com/840745
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Elliot Glaysher <erg@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529821}
diff --git a/chromecast/chromecast.gni b/chromecast/chromecast.gni
index 28cb596..99759f9a 100644
--- a/chromecast/chromecast.gni
+++ b/chromecast/chromecast.gni
@@ -4,6 +4,7 @@
 
 import("//build/config/chromecast_build.gni")
 import("//build/config/locales.gni")
+import("//extensions/features/features.gni")
 
 # This args block should contain arguments used within the //chromecast
 # directory. Arguments which are used in other Chrome components should
@@ -84,6 +85,9 @@
 # in //build/config/locales.gni.
 cast_locales = locales
 
+# Currently extensions require use_dbus=true if it is a linux build.
+enable_chromecast_extensions = enable_extensions && (!is_linux || use_dbus)
+
 # These templates are a temporary fix fo link libc++ into shared libraries and
 # executables. These should be removed as soon as crbug.com/746091 is resolved.
 foreach(target_type,