Index: third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp b/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp |
index 5d69ffe655861f1781dc423559320c34026f807f..482fe2a1b0375e1f703900f96af7ff67fad93c05 100644 |
--- a/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp |
@@ -56,6 +56,10 @@ static const int mediaSliderThumbPaintHeight = 12; |
static const int mediaOverlayPlayButtonWidth = 48; |
static const int mediaOverlayPlayButtonHeight = 48; |
+// Overlay media remoting disable button size. |
+static const int mediaremotingDisableButtonWidth = 24; |
+static const int mediaremotingDisableButtonHeight = 24; |
+ |
// Alpha for disabled elements. |
static const float kDisabledAlpha = 0.4; |
@@ -203,6 +207,25 @@ bool MediaControlsPainter::paintMediaOverlayPlayButton( |
return paintMediaButton(paintInfo.context, buttonRect, mediaOverlayPlay); |
} |
+bool MediaControlsPainter::paintMediaRemotingDisableButton( |
+ const LayoutObject& object, |
+ const PaintInfo& paintInfo, |
+ const IntRect& rect) { |
+ const HTMLMediaElement* mediaElement = toParentMediaElement(object); |
+ if (!mediaElement) |
+ return false; |
+ |
+ static Image* mediaremotingDisable = platformResource("mediaremotingDisable"); |
+ |
+ IntRect buttonRect(rect); |
miu
2017/03/22 21:26:48
nit:
const IntRect buttonRect(rect.center().x()
xjz
2017/03/22 22:25:09
Done.
|
+ buttonRect.setX(rect.center().x()); |
+ buttonRect.setY(rect.center().y()); |
+ buttonRect.setWidth(mediaremotingDisableButtonWidth); |
+ buttonRect.setHeight(mediaremotingDisableButtonHeight); |
+ |
+ return paintMediaButton(paintInfo.context, buttonRect, mediaremotingDisable); |
+} |
+ |
static void paintRoundedSliderBackground(const IntRect& rect, |
const ComputedStyle& style, |
GraphicsContext& context, |