Index: Source/core/html/shadow/MediaControlElementTypes.cpp |
diff --git a/Source/core/html/shadow/MediaControlElementTypes.cpp b/Source/core/html/shadow/MediaControlElementTypes.cpp |
index 7c216b83499cb5063590cebd003cd9e05513cc3f..23f88124472c59739be3dcc46c8b79681c53389d 100644 |
--- a/Source/core/html/shadow/MediaControlElementTypes.cpp |
+++ b/Source/core/html/shadow/MediaControlElementTypes.cpp |
@@ -36,6 +36,8 @@ |
#include "bindings/v8/ExceptionStatePlaceholder.h" |
#include "core/css/StylePropertySet.h" |
#include "core/events/MouseEvent.h" |
+#include "core/html/HTMLMediaElement.h" |
+#include "core/html/shadow/MediaControls.h" |
namespace WebCore { |
@@ -65,13 +67,23 @@ MediaControlElementType mediaControlElementType(Node* node) |
return static_cast<MediaControlDivElement*>(element)->displayType(); |
} |
-MediaControlElement::MediaControlElement(MediaControlElementType displayType, HTMLElement* element) |
- : m_mediaController(0) |
+MediaControlElement::MediaControlElement(MediaControls& mediaControls, MediaControlElementType displayType, HTMLElement* element) |
+ : m_mediaControls(mediaControls) |
, m_displayType(displayType) |
, m_element(element) |
{ |
} |
+HTMLMediaElement& MediaControlElement::mediaElement() const |
+{ |
+ return mediaControls().mediaElement(); |
+} |
+ |
+MediaControllerInterface& MediaControlElement::mediaControllerInterface() const |
+{ |
+ return mediaControls().mediaControllerInterface(); |
+} |
+ |
void MediaControlElement::hide() |
{ |
m_element->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); |
@@ -94,17 +106,17 @@ void MediaControlElement::setDisplayType(MediaControlElementType displayType) |
// ---------------------------- |
-MediaControlDivElement::MediaControlDivElement(Document& document, MediaControlElementType displayType) |
- : HTMLDivElement(document) |
- , MediaControlElement(displayType, this) |
+MediaControlDivElement::MediaControlDivElement(MediaControls& mediaControls, MediaControlElementType displayType) |
+ : HTMLDivElement(mediaControls.document()) |
+ , MediaControlElement(mediaControls, displayType, this) |
{ |
} |
// ---------------------------- |
-MediaControlInputElement::MediaControlInputElement(Document& document, MediaControlElementType displayType) |
- : HTMLInputElement(document, 0, false) |
- , MediaControlElement(displayType, this) |
+MediaControlInputElement::MediaControlInputElement(MediaControls& mediaControls, MediaControlElementType displayType) |
+ : HTMLInputElement(mediaControls.document(), 0, false) |
+ , MediaControlElement(mediaControls, displayType, this) |
{ |
} |
@@ -115,8 +127,8 @@ bool MediaControlInputElement::isMouseFocusable() const |
// ---------------------------- |
-MediaControlTimeDisplayElement::MediaControlTimeDisplayElement(Document& document, MediaControlElementType displayType) |
- : MediaControlDivElement(document, displayType) |
+MediaControlTimeDisplayElement::MediaControlTimeDisplayElement(MediaControls& mediaControls, MediaControlElementType displayType) |
+ : MediaControlDivElement(mediaControls, displayType) |
, m_currentValue(0) |
{ |
} |