| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 | 658 |
| 659 WebLocalizedString::Name | 659 WebLocalizedString::Name |
| 660 MediaControlDownloadButtonElement::getOverflowStringName() { | 660 MediaControlDownloadButtonElement::getOverflowStringName() { |
| 661 return WebLocalizedString::OverflowMenuDownload; | 661 return WebLocalizedString::OverflowMenuDownload; |
| 662 } | 662 } |
| 663 | 663 |
| 664 bool MediaControlDownloadButtonElement::shouldDisplayDownloadButton() { | 664 bool MediaControlDownloadButtonElement::shouldDisplayDownloadButton() { |
| 665 const KURL& url = mediaElement().currentSrc(); | 665 const KURL& url = mediaElement().currentSrc(); |
| 666 | 666 |
| 667 // Check page settings to see if download is disabled. | 667 // Check page settings to see if download is disabled. |
| 668 if (document().page() && document().page()->settings().hideDownloadUI()) | 668 if (document().page() && document().page()->settings().getHideDownloadUI()) |
| 669 return false; | 669 return false; |
| 670 | 670 |
| 671 // URLs that lead to nowhere are ignored. | 671 // URLs that lead to nowhere are ignored. |
| 672 if (url.isNull() || url.isEmpty()) | 672 if (url.isNull() || url.isEmpty()) |
| 673 return false; | 673 return false; |
| 674 | 674 |
| 675 // Local files and blobs should not have a download button. | 675 // Local files and blobs should not have a download button. |
| 676 if (url.isLocalFile() || url.protocolIs("blob")) | 676 if (url.isLocalFile() || url.protocolIs("blob")) |
| 677 return false; | 677 return false; |
| 678 | 678 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 MediaControlCurrentTimeDisplayElement* | 1041 MediaControlCurrentTimeDisplayElement* |
| 1042 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { | 1042 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { |
| 1043 MediaControlCurrentTimeDisplayElement* element = | 1043 MediaControlCurrentTimeDisplayElement* element = |
| 1044 new MediaControlCurrentTimeDisplayElement(mediaControls); | 1044 new MediaControlCurrentTimeDisplayElement(mediaControls); |
| 1045 element->setShadowPseudoId( | 1045 element->setShadowPseudoId( |
| 1046 AtomicString("-webkit-media-controls-current-time-display")); | 1046 AtomicString("-webkit-media-controls-current-time-display")); |
| 1047 return element; | 1047 return element; |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 } // namespace blink | 1050 } // namespace blink |
| OLD | NEW |