OLD | NEW |
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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 327 |
328 static bool paintMediaToggleClosedCaptionsButton(RenderObject* object, const Pai
ntInfo& paintInfo, const IntRect& rect) | 328 static bool paintMediaToggleClosedCaptionsButton(RenderObject* object, const Pai
ntInfo& paintInfo, const IntRect& rect) |
329 { | 329 { |
330 HTMLMediaElement* mediaElement = toParentMediaElement(object); | 330 HTMLMediaElement* mediaElement = toParentMediaElement(object); |
331 if (!mediaElement) | 331 if (!mediaElement) |
332 return false; | 332 return false; |
333 | 333 |
334 static Image* mediaClosedCaptionButton = platformResource("mediaplayerClosed
Caption"); | 334 static Image* mediaClosedCaptionButton = platformResource("mediaplayerClosed
Caption"); |
335 static Image* mediaClosedCaptionButtonDisabled = platformResource("mediaplay
erClosedCaptionDisabled"); | 335 static Image* mediaClosedCaptionButtonDisabled = platformResource("mediaplay
erClosedCaptionDisabled"); |
336 | 336 |
337 if (mediaElement->webkitClosedCaptionsVisible()) | 337 if (mediaElement->closedCaptionsVisible()) |
338 return paintMediaButton(paintInfo.context, rect, mediaClosedCaptionButto
n); | 338 return paintMediaButton(paintInfo.context, rect, mediaClosedCaptionButto
n); |
339 | 339 |
340 return paintMediaButton(paintInfo.context, rect, mediaClosedCaptionButtonDis
abled); | 340 return paintMediaButton(paintInfo.context, rect, mediaClosedCaptionButtonDis
abled); |
341 } | 341 } |
342 | 342 |
343 | 343 |
344 bool RenderMediaControls::paintMediaControlsPart(MediaControlElementType part, R
enderObject* object, const PaintInfo& paintInfo, const IntRect& rect) | 344 bool RenderMediaControls::paintMediaControlsPart(MediaControlElementType part, R
enderObject* object, const PaintInfo& paintInfo, const IntRect& rect) |
345 { | 345 { |
346 switch (part) { | 346 switch (part) { |
347 case MediaMuteButton: | 347 case MediaMuteButton: |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 { | 443 { |
444 return formatChromiumMediaControlsTime(time, time); | 444 return formatChromiumMediaControlsTime(time, time); |
445 } | 445 } |
446 | 446 |
447 String RenderMediaControls::formatMediaControlsCurrentTime(float currentTime, fl
oat duration) | 447 String RenderMediaControls::formatMediaControlsCurrentTime(float currentTime, fl
oat duration) |
448 { | 448 { |
449 return formatChromiumMediaControlsTime(currentTime, duration); | 449 return formatChromiumMediaControlsTime(currentTime, duration); |
450 } | 450 } |
451 | 451 |
452 } // namespace WebCore | 452 } // namespace WebCore |
OLD | NEW |