InjectedBundleNodeHandle.h [plain text]
#ifndef InjectedBundleNodeHandle_h
#define InjectedBundleNodeHandle_h
#include "APIObject.h"
#include "ImageOptions.h"
#include <JavaScriptCore/JSBase.h>
#include <wtf/Forward.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
namespace WebCore {
class IntRect;
class Node;
}
namespace WebKit {
class InjectedBundleScriptWorld;
class WebFrame;
class WebImage;
class InjectedBundleNodeHandle : public TypedAPIObject<APIObject::TypeBundleNodeHandle> {
public:
static PassRefPtr<InjectedBundleNodeHandle> getOrCreate(JSContextRef, JSObjectRef);
static PassRefPtr<InjectedBundleNodeHandle> getOrCreate(WebCore::Node*);
virtual ~InjectedBundleNodeHandle();
WebCore::Node* coreNode() const;
PassRefPtr<InjectedBundleNodeHandle> document();
WebCore::IntRect elementBounds() const;
WebCore::IntRect renderRect(bool*) const;
PassRefPtr<WebImage> renderedImage(SnapshotOptions);
void setHTMLInputElementValueForUser(const String&);
bool isHTMLInputElementAutofilled() const;
void setHTMLInputElementAutofilled(bool);
bool htmlInputElementLastChangeWasUserEdit();
bool htmlTextAreaElementLastChangeWasUserEdit();
PassRefPtr<InjectedBundleNodeHandle> htmlTableCellElementCellAbove();
PassRefPtr<WebFrame> documentFrame();
PassRefPtr<WebFrame> htmlFrameElementContentFrame();
PassRefPtr<WebFrame> htmlIFrameElementContentFrame();
private:
static PassRefPtr<InjectedBundleNodeHandle> create(WebCore::Node*);
InjectedBundleNodeHandle(WebCore::Node*);
RefPtr<WebCore::Node> m_node;
};
}
#endif // InjectedBundleNodeHandle_h