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

Unified Diff: Source/core/html/shadow/MediaControlElementTypes.h

Issue 195473002: Let MediaControls use the parent HTMLMediaElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Give MediaControls to MediaControlElements Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/shadow/MediaControlElementTypes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/MediaControlElementTypes.h
diff --git a/Source/core/html/shadow/MediaControlElementTypes.h b/Source/core/html/shadow/MediaControlElementTypes.h
index d44f5bc89b903b27e18ef0d998c7f1e8a0470833..511b768db37fec7df3e1adffbd9798a704b80e7e 100644
--- a/Source/core/html/shadow/MediaControlElementTypes.h
+++ b/Source/core/html/shadow/MediaControlElementTypes.h
@@ -32,12 +32,14 @@
#include "core/html/HTMLDivElement.h"
#include "core/html/HTMLInputElement.h"
-#include "core/html/HTMLMediaElement.h"
-#include "core/html/MediaControllerInterface.h"
#include "core/rendering/RenderBlock.h"
namespace WebCore {
+class HTMLMediaElement;
+class MediaControllerInterface;
+class MediaControls;
+
enum MediaControlElementType {
MediaEnterFullscreenButton = 0,
MediaMuteButton,
@@ -78,17 +80,17 @@ public:
MediaControlElementType displayType() { return m_displayType; }
- void setMediaController(MediaControllerInterface* controller) { m_mediaController = controller; }
- MediaControllerInterface* mediaController() const { return m_mediaController; }
-
protected:
- explicit MediaControlElement(MediaControlElementType, HTMLElement*);
- ~MediaControlElement() { }
+ MediaControlElement(MediaControls&, MediaControlElementType, HTMLElement*);
+
+ MediaControls& mediaControls() const { return m_mediaControls; }
+ HTMLMediaElement& mediaElement() const;
+ MediaControllerInterface& mediaControllerInterface() const;
void setDisplayType(MediaControlElementType);
private:
- MediaControllerInterface* m_mediaController;
+ MediaControls& m_mediaControls;
MediaControlElementType m_displayType;
HTMLElement* m_element;
};
@@ -98,7 +100,7 @@ private:
class MediaControlDivElement : public HTMLDivElement, public MediaControlElement {
protected:
virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; }
- explicit MediaControlDivElement(Document&, MediaControlElementType);
+ MediaControlDivElement(MediaControls&, MediaControlElementType);
};
// ----------------------------
@@ -106,7 +108,7 @@ protected:
class MediaControlInputElement : public HTMLInputElement, public MediaControlElement {
protected:
virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; }
- explicit MediaControlInputElement(Document&, MediaControlElementType);
+ MediaControlInputElement(MediaControls&, MediaControlElementType);
private:
virtual void updateDisplayType() { }
@@ -121,7 +123,7 @@ public:
double currentValue() const { return m_currentValue; }
protected:
- explicit MediaControlTimeDisplayElement(Document&, MediaControlElementType);
+ MediaControlTimeDisplayElement(MediaControls&, MediaControlElementType);
private:
double m_currentValue;
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/shadow/MediaControlElementTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698