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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp

Issue 2588823002: Media Controls: change how the MediaControls object is created and handled. (Closed)
Patch Set: Created 3 years, 12 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) 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698