| Index: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| index 43d3719aaa2470c94e0d1b92d27c87ec97087796..117b283e1a9a8438949eb77ddc2db449f4502af1 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| @@ -241,103 +241,6 @@ bool MediaControlPanelElement::KeepEventInNode(Event* event) {
|
|
|
| // ----------------------------
|
|
|
| -MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement(
|
| - MediaControls& media_controls)
|
| - // Mapping onto same MediaControlElementType as panel element, since it has
|
| - // similar properties.
|
| - : MediaControlDivElement(media_controls, kMediaControlsPanel) {}
|
| -
|
| -MediaControlPanelEnclosureElement* MediaControlPanelEnclosureElement::Create(
|
| - MediaControls& media_controls) {
|
| - MediaControlPanelEnclosureElement* enclosure =
|
| - new MediaControlPanelEnclosureElement(media_controls);
|
| - enclosure->SetShadowPseudoId(
|
| - AtomicString("-webkit-media-controls-enclosure"));
|
| - return enclosure;
|
| -}
|
| -
|
| -// ----------------------------
|
| -
|
| -MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement(
|
| - MediaControls& media_controls)
|
| - // Mapping onto same MediaControlElementType as panel element, since it has
|
| - // similar properties.
|
| - : MediaControlDivElement(media_controls, kMediaControlsPanel) {}
|
| -
|
| -MediaControlOverlayEnclosureElement*
|
| -MediaControlOverlayEnclosureElement::Create(MediaControls& media_controls) {
|
| - MediaControlOverlayEnclosureElement* enclosure =
|
| - new MediaControlOverlayEnclosureElement(media_controls);
|
| - enclosure->SetShadowPseudoId(
|
| - AtomicString("-webkit-media-controls-overlay-enclosure"));
|
| - return enclosure;
|
| -}
|
| -
|
| -EventDispatchHandlingState*
|
| -MediaControlOverlayEnclosureElement::PreDispatchEventHandler(Event* event) {
|
| - // When the media element is clicked or touched we want to make the overlay
|
| - // cast button visible (if the other requirements are right) even if
|
| - // JavaScript is doing its own handling of the event. Doing it in
|
| - // preDispatchEventHandler prevents any interference from JavaScript.
|
| - // Note that we can't simply test for click, since JS handling of touch events
|
| - // can prevent their translation to click events.
|
| - if (event && (event->type() == EventTypeNames::click ||
|
| - event->type() == EventTypeNames::touchstart))
|
| - GetMediaControls().ShowOverlayCastButtonIfNeeded();
|
| - return MediaControlDivElement::PreDispatchEventHandler(event);
|
| -}
|
| -
|
| -// ----------------------------
|
| -
|
| -MediaControlMuteButtonElement::MediaControlMuteButtonElement(
|
| - MediaControls& media_controls)
|
| - : MediaControlInputElement(media_controls, kMediaMuteButton) {}
|
| -
|
| -MediaControlMuteButtonElement* MediaControlMuteButtonElement::Create(
|
| - MediaControls& media_controls) {
|
| - MediaControlMuteButtonElement* button =
|
| - new MediaControlMuteButtonElement(media_controls);
|
| - button->EnsureUserAgentShadowRoot();
|
| - button->setType(InputTypeNames::button);
|
| - button->SetShadowPseudoId(AtomicString("-webkit-media-controls-mute-button"));
|
| - return button;
|
| -}
|
| -
|
| -void MediaControlMuteButtonElement::DefaultEventHandler(Event* event) {
|
| - if (event->type() == EventTypeNames::click) {
|
| - if (MediaElement().muted())
|
| - Platform::Current()->RecordAction(
|
| - UserMetricsAction("Media.Controls.Unmute"));
|
| - else
|
| - Platform::Current()->RecordAction(
|
| - UserMetricsAction("Media.Controls.Mute"));
|
| -
|
| - MediaElement().setMuted(!MediaElement().muted());
|
| - event->SetDefaultHandled();
|
| - }
|
| -
|
| - MediaControlInputElement::DefaultEventHandler(event);
|
| -}
|
| -
|
| -void MediaControlMuteButtonElement::UpdateDisplayType() {
|
| - // TODO(mlamouri): checking for volume == 0 because the mute button will look
|
| - // 'muted' when the volume is 0 even if the element is not muted. This allows
|
| - // the painting and the display type to actually match.
|
| - SetDisplayType((MediaElement().muted() || MediaElement().volume() == 0)
|
| - ? kMediaUnMuteButton
|
| - : kMediaMuteButton);
|
| - UpdateOverflowString();
|
| -}
|
| -
|
| -WebLocalizedString::Name
|
| -MediaControlMuteButtonElement::GetOverflowStringName() {
|
| - if (MediaElement().muted())
|
| - return WebLocalizedString::kOverflowMenuUnmute;
|
| - return WebLocalizedString::kOverflowMenuMute;
|
| -}
|
| -
|
| -// ----------------------------
|
| -
|
| MediaControlPlayButtonElement::MediaControlPlayButtonElement(
|
| MediaControls& media_controls)
|
| : MediaControlInputElement(media_controls, kMediaPlayButton) {}
|
|
|