diff options
Diffstat (limited to 'Source/WebKit/chromium/public/WebIDBKeyPath.h')
-rw-r--r-- | Source/WebKit/chromium/public/WebIDBKeyPath.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Source/WebKit/chromium/public/WebIDBKeyPath.h b/Source/WebKit/chromium/public/WebIDBKeyPath.h index 4c7259f03..97bac06ff 100644 --- a/Source/WebKit/chromium/public/WebIDBKeyPath.h +++ b/Source/WebKit/chromium/public/WebIDBKeyPath.h @@ -28,6 +28,7 @@ #include "platform/WebCommon.h" #include "platform/WebPrivateOwnPtr.h" +#include "platform/WebString.h" #include "platform/WebVector.h" namespace WTF { @@ -37,14 +38,29 @@ class String; namespace WebKit { -class WebString; - class WebIDBKeyPath { public: WEBKIT_EXPORT static WebIDBKeyPath create(const WebString&); - WebIDBKeyPath(const WebIDBKeyPath& keyPath) { assign(keyPath); } + WEBKIT_EXPORT static WebIDBKeyPath create(const WebVector<WebString>&); + WEBKIT_EXPORT static WebIDBKeyPath createNull(); + WEBKIT_EXPORT WebIDBKeyPath(const WebIDBKeyPath&); ~WebIDBKeyPath() { reset(); } + enum Type { + NullType = 0, + StringType, + ArrayType, + }; + + WEBKIT_EXPORT bool isValid() const; + WEBKIT_EXPORT Type type() const; + // FIXME: Array-type key paths not yet supported. http://webkit.org/b/84207 + WebVector<WebString> array() const { WEBKIT_ASSERT_NOT_REACHED(); return WebVector<WebString>(); } + WEBKIT_EXPORT WebString string() const; + + // FIXME: Remove these once callers are updated. http://webkit.org/b/84207 + WEBKIT_EXPORT WebIDBKeyPath(const WebString&); + operator const WebString () const { return string(); } WEBKIT_EXPORT int parseError() const; WEBKIT_EXPORT void assign(const WebIDBKeyPath&); WEBKIT_EXPORT void reset(); |