Index: third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.cpp |
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.cpp b/third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.cpp |
index f38296b13caa2f55ef6c9b2a6b8d504657ccf12d..be4809ee67bd21f94a88efd970fc73a4685b0517 100644 |
--- a/third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.cpp |
+++ b/third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.cpp |
@@ -8,6 +8,7 @@ |
#include "core/html/HTMLImageElement.h" |
#include "core/html/HTMLVideoElement.h" |
#include "core/html/shadow/MediaRemotingElements.h" |
+#include "platform/RuntimeEnabledFeatures.h" |
namespace { |
@@ -40,8 +41,10 @@ MediaRemotingInterstitial::MediaRemotingInterstitial( |
cast_text_message_ = new MediaRemotingCastMessageElement(*this); |
AppendChild(cast_text_message_); |
- exit_button_ = new MediaRemotingExitButtonElement(*this); |
- AppendChild(exit_button_); |
+ if (!RuntimeEnabledFeatures::newRemotePlaybackPipelineEnabled()) { |
+ exit_button_ = new MediaRemotingExitButtonElement(*this); |
+ AppendChild(exit_button_); |
+ } |
} |
void MediaRemotingInterstitial::Show() { |
@@ -50,7 +53,8 @@ void MediaRemotingInterstitial::Show() { |
toggle_insterstitial_timer_.Stop(); |
should_be_visible_ = true; |
RemoveInlineStyleProperty(CSSPropertyDisplay); |
- exit_button_->OnShown(); |
+ if (exit_button_) |
+ exit_button_->OnShown(); |
toggle_insterstitial_timer_.StartOneShot(kStyleChangeTransSeconds, |
BLINK_FROM_HERE); |
} |
@@ -62,7 +66,8 @@ void MediaRemotingInterstitial::Hide() { |
should_be_visible_ = false; |
SetInlineStyleProperty(CSSPropertyOpacity, 0, |
CSSPrimitiveValue::UnitType::kNumber); |
- exit_button_->OnHidden(); |
+ if (exit_button_) |
+ exit_button_->OnHidden(); |
toggle_insterstitial_timer_.StartOneShot(kHiddenAnimationSeconds, |
BLINK_FROM_HERE); |
} |