| Index: third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.h
|
| diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.h b/third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.h
|
| index cabfb86e924f2d3dcca320a6ce64e7e978cad6fb..ba750b6db6bad09481f028f618a2ecbce615b6ee 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.h
|
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.h
|
| @@ -34,6 +34,7 @@
|
| #include "core/html/HTMLDivElement.h"
|
| #include "core/html/HTMLInputElement.h"
|
| #include "core/layout/LayoutBlock.h"
|
| +#include "public/platform/WebLocalizedString.h"
|
|
|
| namespace blink {
|
|
|
| @@ -89,6 +90,25 @@ public:
|
|
|
| MediaControlElementType displayType() const { return m_displayType; }
|
|
|
| + // By default, media controls elements are not added to the overflow menu.
|
| + // Controls that can be added to the overflow menu should override this
|
| + // function and return true.
|
| + virtual bool hasOverflowButton() { return false; }
|
| +
|
| + // If true, shows the overflow menu item if it exists. Hides it if false.
|
| + void shouldShowButtonInOverflowMenu(bool);
|
| +
|
| + // Creates an overflow menu HTML element.
|
| + virtual Element* initOverflowButton(MediaControls&) { return nullptr; }
|
| +
|
| + // Returns a string representation of the media control element. Used for
|
| + // the overflow menu.
|
| + String getText();
|
| +
|
| + // Returns a string representation of the media control element.
|
| + // TODO: default value should be changed
|
| + virtual WebLocalizedString::Name getOverflowStringName() { return WebLocalizedString::AXAMPMFieldText; }
|
| +
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| protected:
|
| @@ -103,6 +123,11 @@ protected:
|
|
|
| void setDisplayType(MediaControlElementType);
|
|
|
| + // Represents the overflow menu element for this media control.
|
| + // The Element contains the button that the user can click on, but having
|
| + // the button within an Element enables us to style the overflow menu.
|
| + Member<Element> m_overflowMenuElement;
|
| +
|
| private:
|
| // Hide or show based on our fits / wanted state. We want to show
|
| // if and only if we're wanted and we fit.
|
| @@ -136,6 +161,9 @@ class MediaControlInputElement : public HTMLInputElement, public MediaControlEle
|
| public:
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| + // Creates an overflow menu element with the given button as a child.
|
| + HTMLLabelElement* createOverflowMenuElement(MediaControls&, MediaControlInputElement*);
|
| +
|
| protected:
|
| MediaControlInputElement(MediaControls&, MediaControlElementType);
|
|
|
|
|