Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp

Issue 2767823002: Media Remoting: Add interstitial elements to media element shadow dom. (Closed)
Patch Set: Rebased. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. 2 * Copyright (C) 2009 Apple Inc.
3 * Copyright (C) 2009 Google Inc. 3 * Copyright (C) 2009 Google Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 const ComputedStyle& style, 210 const ComputedStyle& style,
211 GraphicsContext& context, 211 GraphicsContext& context,
212 Color slider_background_color) { 212 Color slider_background_color) {
213 float border_radius = rect.Height() / 2; 213 float border_radius = rect.Height() / 2;
214 FloatSize radii(border_radius, border_radius); 214 FloatSize radii(border_radius, border_radius);
215 215
216 context.FillRoundedRect(FloatRoundedRect(rect, radii, radii, radii, radii), 216 context.FillRoundedRect(FloatRoundedRect(rect, radii, radii, radii, radii),
217 slider_background_color); 217 slider_background_color);
218 } 218 }
219 219
220 bool MediaControlsPainter::PaintMediaRemotingCastIcon(
221 const LayoutObject& object,
222 const PaintInfo& paintInfo,
223 const IntRect& rect) {
224 const HTMLMediaElement* media_element = ToParentMediaElement(object);
225 if (!media_element)
226 return false;
227 static Image* cast_icon = PlatformResource("mediaRemotingCastIcon");
228
229 return PaintMediaButton(paintInfo.context, rect, cast_icon);
230 }
231
220 static void PaintSliderRangeHighlight(const IntRect& rect, 232 static void PaintSliderRangeHighlight(const IntRect& rect,
221 const ComputedStyle& style, 233 const ComputedStyle& style,
222 GraphicsContext& context, 234 GraphicsContext& context,
223 int start_position, 235 int start_position,
224 int end_position, 236 int end_position,
225 Color start_color, 237 Color start_color,
226 Color end_color) { 238 Color end_color) {
227 // Calculate border radius; need to avoid being smaller than half the slider 239 // Calculate border radius; need to avoid being smaller than half the slider
228 // height because of https://bugs.webkit.org/show_bug.cgi?id=30143. 240 // height because of https://bugs.webkit.org/show_bug.cgi?id=30143.
229 float border_radius = rect.Height() / 2.0f; 241 float border_radius = rect.Height() / 2.0f;
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 void MediaControlsPainter::AdjustMediaSliderThumbSize(ComputedStyle& style) { 622 void MediaControlsPainter::AdjustMediaSliderThumbSize(ComputedStyle& style) {
611 const float zoom_level = style.EffectiveZoom(); 623 const float zoom_level = style.EffectiveZoom();
612 624
613 style.SetWidth(Length( 625 style.SetWidth(Length(
614 static_cast<int>(kMediaSliderThumbTouchWidth * zoom_level), kFixed)); 626 static_cast<int>(kMediaSliderThumbTouchWidth * zoom_level), kFixed));
615 style.SetHeight(Length( 627 style.SetHeight(Length(
616 static_cast<int>(kMediaSliderThumbTouchHeight * zoom_level), kFixed)); 628 static_cast<int>(kMediaSliderThumbTouchHeight * zoom_level), kFixed));
617 } 629 }
618 630
619 } // namespace blink 631 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/MediaControlsPainter.h ('k') | third_party/WebKit/Source/core/paint/ThemePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698