SVGDocumentExtensions.h [plain text]
#ifndef SVGDocumentExtensions_h
#define SVGDocumentExtensions_h
#if ENABLE(SVG)
#include "AtomicStringHash.h"
#include "StringImpl.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/PassOwnPtr.h>
namespace WebCore {
class Document;
class RenderSVGResourceContainer;
class String;
class SVGStyledElement;
class SVGSMILElement;
class SVGSVGElement;
class SVGDocumentExtensions : public Noncopyable {
public:
SVGDocumentExtensions(Document*);
~SVGDocumentExtensions();
void addTimeContainer(SVGSVGElement*);
void removeTimeContainer(SVGSVGElement*);
void addResource(const AtomicString& id, RenderSVGResourceContainer*);
void removeResource(const AtomicString& id);
RenderSVGResourceContainer* resourceById(const AtomicString& id) const;
void startAnimations();
void pauseAnimations();
void unpauseAnimations();
bool sampleAnimationAtTime(const String& elementId, SVGSMILElement*, double time);
void reportWarning(const String&);
void reportError(const String&);
private:
Document* m_doc; HashSet<SVGSVGElement*> m_timeContainers; HashMap<AtomicString, RenderSVGResourceContainer*> m_resources;
HashMap<AtomicString, HashSet<SVGStyledElement*>*> m_pendingResources;
SVGDocumentExtensions(const SVGDocumentExtensions&);
SVGDocumentExtensions& operator=(const SVGDocumentExtensions&);
public:
void addPendingResource(const AtomicString& id, SVGStyledElement*);
bool isPendingResource(const AtomicString& id) const;
PassOwnPtr<HashSet<SVGStyledElement*> > removePendingResource(const AtomicString& id);
};
}
#endif
#endif