| Index: Source/core/rendering/RenderMediaControls.cpp
|
| diff --git a/Source/core/rendering/RenderMediaControls.cpp b/Source/core/rendering/RenderMediaControls.cpp
|
| index 90b28aa442f4ae9c026107676cd0a4a99dec4866..ef37fcadcc1bc59345dd1c0119c42764c52891d8 100644
|
| --- a/Source/core/rendering/RenderMediaControls.cpp
|
| +++ b/Source/core/rendering/RenderMediaControls.cpp
|
| @@ -27,6 +27,7 @@
|
|
|
| #include "config.h"
|
| #include "core/rendering/RenderMediaControls.h"
|
| +#include "base/logging.h"
|
|
|
| #include "bindings/v8/ExceptionStatePlaceholder.h"
|
| #include "core/html/HTMLMediaElement.h"
|
| @@ -335,7 +336,29 @@ static bool paintMediaToggleClosedCaptionsButton(RenderObject* object, const Pai
|
|
|
| return paintMediaButton(paintInfo.context, rect, mediaClosedCaptionButtonDisabled);
|
| }
|
| +static bool paintMediaCastOffButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +{
|
| + LOG(INFO) << "Painting Cast Off Button";
|
| + HTMLMediaElement* mediaElement = toParentMediaElement(object);
|
| + if (!mediaElement)
|
| + return false;
|
| +
|
| + static Image* mediaCastOffButton = platformResource("mediaplayerCastOff");
|
| + return paintMediaButton(paintInfo.context, rect, mediaCastOffButton);
|
| +
|
| +}
|
|
|
| +static bool paintMediaCastOnButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +{
|
| + LOG(INFO) << "Painting Cast On Button";
|
| + HTMLMediaElement* mediaElement = toParentMediaElement(object);
|
| + if (!mediaElement)
|
| + return false;
|
| +
|
| + static Image* mediaCastOnButton = platformResource("mediaplayerCastOn");
|
| + return paintMediaButton(paintInfo.context, rect, mediaCastOnButton);
|
| +
|
| +}
|
|
|
| bool RenderMediaControls::paintMediaControlsPart(MediaControlElementType part, RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| @@ -361,6 +384,10 @@ bool RenderMediaControls::paintMediaControlsPart(MediaControlElementType part, R
|
| return paintMediaFullscreenButton(object, paintInfo, rect);
|
| case MediaOverlayPlayButton:
|
| return paintMediaOverlayPlayButton(object, paintInfo, rect);
|
| + case MediaCastOffButton:
|
| + return paintMediaCastOffButton(object, paintInfo, rect);
|
| + case MediaCastOnButton:
|
| + return paintMediaCastOnButton(object, paintInfo, rect);
|
| case MediaVolumeSliderContainer:
|
| case MediaTimelineContainer:
|
| case MediaCurrentTimeDisplay:
|
|
|