#ifndef APIObject_h
#define APIObject_h
#include <wtf/RefCounted.h>
namespace WebKit {
class APIObject : public ThreadSafeRefCounted<APIObject> {
public:
enum Type {
TypeNull = 0,
TypeArray,
TypeAuthenticationChallenge,
TypeAuthenticationDecisionListener,
TypeCertificateInfo,
TypeConnection,
TypeContextMenuItem,
TypeCredential,
TypeData,
TypeDictionary,
TypeError,
TypeGraphicsContext,
TypeImage,
TypeProtectionSpace,
TypeRenderLayer,
TypeRenderObject,
TypeSecurityOrigin,
TypeSerializedScriptValue,
TypeString,
TypeURL,
TypeURLRequest,
TypeURLResponse,
TypeUserContentURLPattern,
TypeWebArchive,
TypeWebArchiveResource,
TypeBoolean,
TypeDouble,
TypeUInt64,
TypePoint,
TypeSize,
TypeRect,
TypeApplicationCacheManager,
TypeBackForwardList,
TypeBackForwardListItem,
TypeBatteryManager,
TypeBatteryStatus,
TypeCacheManager,
TypeColorPickerResultListener,
TypeContext,
TypeCookieManager,
TypeDatabaseManager,
TypeDownload,
TypeFormSubmissionListener,
TypeFrame,
TypeFramePolicyListener,
TypeFullScreenManager,
TypeGeolocationManager,
TypeGeolocationPermissionRequest,
TypeHitTestResult,
TypeGeolocationPosition,
TypeGrammarDetail,
TypeIconDatabase,
TypeInspector,
TypeKeyValueStorageManager,
TypeMediaCacheManager,
TypeNavigationData,
TypeNetworkInfo,
TypeNetworkInfoManager,
TypeNotification,
TypeNotificationManager,
TypeNotificationPermissionRequest,
TypeOpenPanelParameters,
TypeOpenPanelResultListener,
TypePage,
TypePageGroup,
TypePluginSiteDataManager,
TypePreferences,
TypeTextChecker,
TypeVibration,
TypeViewportAttributes,
TypeBundle,
TypeBundleBackForwardList,
TypeBundleBackForwardListItem,
TypeBundleDOMWindowExtension,
TypeBundleFrame,
TypeBundleHitTestResult,
TypeBundleInspector,
TypeBundleNavigationAction,
TypeBundleNodeHandle,
TypeBundlePage,
TypeBundlePageBanner,
TypeBundlePageGroup,
TypeBundlePageOverlay,
TypeBundleRangeHandle,
TypeBundleScriptWorld,
TypeEditCommandProxy,
TypeObjCObjectGraph,
TypeView,
#if USE(SOUP)
TypeSoupRequestManager,
#endif
#if PLATFORM(EFL)
TypePopupMenuItem,
#endif
};
virtual ~APIObject()
{
}
virtual Type type() const = 0;
protected:
APIObject();
};
template <APIObject::Type ArgumentType>
class TypedAPIObject : public APIObject {
public:
static const Type APIType = ArgumentType;
virtual ~TypedAPIObject()
{
}
protected:
TypedAPIObject()
{
}
virtual Type type() const OVERRIDE { return APIType; }
};
}
#endif // APIObject_h