
#ifndef NetTVDocument_h
#define NetTVDocument_h

#if ENABLE(NETTV)

#include "Document.h"
#include <wtf/OwnPtr.h>

namespace WebCore {

class Node;
class GraphicsContext;
class StyledElement;
class HTMLObjectElement;
class NetTVDocumentPrivate;

class NetTVDocument : public Document
{
	friend class NetTVDocumentPrivate;
	
public:	
    static PassRefPtr<NetTVDocument> create(Frame* frame, const KURL& homeURL, const KURL& netTVURL)
    {
        return adoptRef(new NetTVDocument(frame, homeURL, netTVURL));
    }

    virtual ~NetTVDocument();

    virtual bool isNetTVDocument() const { return true; }

    virtual PassRefPtr<DocumentParser> createParser();
    
    virtual bool paint(GraphicsContext*, IntRect&);
    
    void setOnloadFinished();
    
    Vector<char>& getBuffer(){return m_buffer;}
    
    int mediaplayerID() const { return m_mediaplayerID; }

    void platformDestroy();
    
private:
    NetTVDocument(Frame*, const KURL& homeURL, const KURL& netTVURL);

    bool m_NetTVOnloadFinished;
    int m_mediaplayerID;
    
	const KURL m_homeURL;
	const KURL m_netTVURL;
    Vector<char> m_buffer;
};

}

#endif // ENABLE(NETTV)
#endif //NetTVDocument_h


