Commit e43a540b authored by Shawn Gallea's avatar Shawn Gallea Committed by Commit Bot

Check ENABLE_MEDIA_OVERLAY before creating media_overlay_

Only create media_overlay_ if ENABLE_MEDIA_OVERLAY is defined

Bug: b/156276792
Test: Build cast_shell
Change-Id: I490ab1ff2fe45ef516fa108b8e30389abb052fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212969
Commit-Queue: Shawn Gallea <sagallea@google.com>
Reviewed-by: default avatarDaniel Nicoara <dnicoara@chromium.org>
Reviewed-by: default avatarSean Topping <seantopping@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771271}
parent fad91756
...@@ -131,6 +131,9 @@ declare_args() { ...@@ -131,6 +131,9 @@ declare_args() {
# Extra rpath to use for standalone services. # Extra rpath to use for standalone services.
iot_service_rpath = "" iot_service_rpath = ""
# Set to true to enable media overlay for volume bar, etc.
enable_media_overlay = false
} }
declare_args() { declare_args() {
......
...@@ -57,6 +57,10 @@ cast_source_set("aura_components") { ...@@ -57,6 +57,10 @@ cast_source_set("aura_components") {
} else { } else {
sources += [ "aura_components_dummy.cc" ] sources += [ "aura_components_dummy.cc" ]
} }
if (enable_media_overlay) {
defines = [ "ENABLE_MEDIA_OVERLAY" ]
}
} }
if (use_aura) { if (use_aura) {
......
...@@ -9,7 +9,11 @@ ...@@ -9,7 +9,11 @@
namespace chromecast { namespace chromecast {
AuraComponents::AuraComponents(CastWindowManager* cast_window_manager) AuraComponents::AuraComponents(CastWindowManager* cast_window_manager)
: media_overlay_(std::make_unique<MediaOverlayImpl>(cast_window_manager)) {} #if defined(ENABLE_MEDIA_OVERLAY)
: media_overlay_(std::make_unique<MediaOverlayImpl>(cast_window_manager))
#endif
{
}
AuraComponents::~AuraComponents() = default; AuraComponents::~AuraComponents() = default;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment