| 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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 : MediaControlInputElement(mediaControls, MediaEnterFullscreenButton) {} | 871 : MediaControlInputElement(mediaControls, MediaEnterFullscreenButton) {} |
| 872 | 872 |
| 873 MediaControlFullscreenButtonElement* | 873 MediaControlFullscreenButtonElement* |
| 874 MediaControlFullscreenButtonElement::create(MediaControls& mediaControls) { | 874 MediaControlFullscreenButtonElement::create(MediaControls& mediaControls) { |
| 875 MediaControlFullscreenButtonElement* button = | 875 MediaControlFullscreenButtonElement* button = |
| 876 new MediaControlFullscreenButtonElement(mediaControls); | 876 new MediaControlFullscreenButtonElement(mediaControls); |
| 877 button->ensureUserAgentShadowRoot(); | 877 button->ensureUserAgentShadowRoot(); |
| 878 button->setType(InputTypeNames::button); | 878 button->setType(InputTypeNames::button); |
| 879 button->setShadowPseudoId( | 879 button->setShadowPseudoId( |
| 880 AtomicString("-webkit-media-controls-fullscreen-button")); | 880 AtomicString("-webkit-media-controls-fullscreen-button")); |
| 881 button->setIsFullscreen(mediaControls.mediaElement().isFullscreen()); |
| 881 button->setIsWanted(false); | 882 button->setIsWanted(false); |
| 882 return button; | 883 return button; |
| 883 } | 884 } |
| 884 | 885 |
| 885 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) { | 886 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) { |
| 886 if (event->type() == EventTypeNames::click) { | 887 if (event->type() == EventTypeNames::click) { |
| 887 if (mediaElement().isFullscreen()) { | 888 if (mediaElement().isFullscreen()) { |
| 888 Platform::current()->recordAction( | 889 Platform::current()->recordAction( |
| 889 UserMetricsAction("Media.Controls.ExitFullscreen")); | 890 UserMetricsAction("Media.Controls.ExitFullscreen")); |
| 890 mediaControls().exitFullscreen(); | 891 mediaControls().exitFullscreen(); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 MediaControlCurrentTimeDisplayElement* | 1041 MediaControlCurrentTimeDisplayElement* |
| 1041 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { | 1042 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { |
| 1042 MediaControlCurrentTimeDisplayElement* element = | 1043 MediaControlCurrentTimeDisplayElement* element = |
| 1043 new MediaControlCurrentTimeDisplayElement(mediaControls); | 1044 new MediaControlCurrentTimeDisplayElement(mediaControls); |
| 1044 element->setShadowPseudoId( | 1045 element->setShadowPseudoId( |
| 1045 AtomicString("-webkit-media-controls-current-time-display")); | 1046 AtomicString("-webkit-media-controls-current-time-display")); |
| 1046 return element; | 1047 return element; |
| 1047 } | 1048 } |
| 1048 | 1049 |
| 1049 } // namespace blink | 1050 } // namespace blink |
| OLD | NEW |