#ifndef PagePopup_h
#define PagePopup_h
#include "IntRect.h"
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
typedef const struct OpaqueJSContext* JSContextRef;
typedef struct OpaqueJSValue* JSObjectRef;
typedef const struct OpaqueJSValue* JSValueRef;
namespace WebCore {
class DocumentWriter;
class Frame;
}
namespace BlackBerry {
namespace WebKit {
class WebPage;
class WebPagePrivate;
class PagePopupClient;
class PagePopup : public RefCounted<PagePopup> {
public:
static PassRefPtr<PagePopup> create(WebPagePrivate* webPagePrivate, PagePopupClient* client)
{
return adoptRef(new PagePopup(webPagePrivate, client));
}
~PagePopup();
void initialize(WebPage*);
void close();
private:
PagePopup(WebPagePrivate*, PagePopupClient*);
void writeDocument(WebCore::DocumentWriter*);
void installDOMFunction(WebCore::Frame*);
static JSValueRef setValueAndClosePopupCallback(JSContextRef, JSObjectRef, JSObjectRef, size_t argumentCount, const JSValueRef arguments[], JSValueRef*);
WebPagePrivate* m_webPagePrivate;
OwnPtr<PagePopupClient> m_client;
};
}
}
#endif // PagePopup_h