QuickTimePluginReplacement.h [plain text]
#ifndef QuickTimePluginReplacement_h
#define QuickTimePluginReplacement_h
#include "PluginReplacement.h"
#include "ScriptState.h"
#include <bindings/ScriptObject.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class HTMLPlugInElement;
class HTMLVideoElement;
class RenderElement;
class RenderStyle;
class ShadowRoot;
class QuickTimePluginReplacement : public PluginReplacement {
public:
static void registerPluginReplacement(PluginReplacementRegistrar);
static bool supportsMimeType(const String&);
static bool supportsFileExtension(const String&);
static bool supportsURL(const URL&) { return true; }
static PassRefPtr<PluginReplacement> create(HTMLPlugInElement&, const Vector<String>& paramNames, const Vector<String>& paramValues);
~QuickTimePluginReplacement();
virtual bool installReplacement(ShadowRoot*) override;
virtual JSC::JSObject* scriptObject() override { return m_scriptObject; }
virtual bool willCreateRenderer() override { return m_mediaElement; }
virtual RenderPtr<RenderElement> createElementRenderer(HTMLPlugInElement&, PassRef<RenderStyle>) override;
HTMLVideoElement* parentElement() { return m_mediaElement.get(); }
unsigned long long movieSize() const;
void postEvent(const String&);
private:
QuickTimePluginReplacement(HTMLPlugInElement&, const Vector<String>& paramNames, const Vector<String>& paramValues);
bool ensureReplacementScriptInjected();
DOMWrapperWorld& isolatedWorld();
HTMLPlugInElement* m_parentElement;
RefPtr<HTMLVideoElement> m_mediaElement;
const Vector<String> m_names;
const Vector<String> m_values;
JSC::JSObject* m_scriptObject;
};
}
#endif