Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / indexeddb / IDBCursor.h
index 6c8725d..64f48dc 100644 (file)
@@ -26,8 +26,8 @@
 #ifndef IDBCursor_h
 #define IDBCursor_h
 
-#include "bindings/v8/ScriptValue.h"
-#include "bindings/v8/ScriptWrappable.h"
+#include "bindings/core/v8/ScriptValue.h"
+#include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/indexeddb/IDBKey.h"
 #include "modules/indexeddb/IDBRequest.h"
 #include "modules/indexeddb/IndexedDB.h"
 
 namespace blink {
 
-class WebBlobInfo;
-
-} // namespace blink
-
-namespace WebCore {
-
 class ExceptionState;
 class IDBAny;
 class IDBTransaction;
 class ExecutionContext;
 class SharedBuffer;
+class WebBlobInfo;
 
 class IDBCursor : public GarbageCollectedFinalized<IDBCursor>, public ScriptWrappable {
 public:
-    static const AtomicString& directionNext();
-    static const AtomicString& directionNextUnique();
-    static const AtomicString& directionPrev();
-    static const AtomicString& directionPrevUnique();
+    static WebIDBCursorDirection stringToDirection(const String& modeString, ExceptionState&);
 
-    static blink::WebIDBCursorDirection stringToDirection(const String& modeString, ExceptionState&);
-    static const AtomicString& directionToString(unsigned short mode);
-
-    static IDBCursor* create(PassOwnPtr<blink::WebIDBCursor>, blink::WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
+    static IDBCursor* create(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
     virtual ~IDBCursor();
     void trace(Visitor*);
     void contextWillBeDestroyed() { m_backend.clear(); }
 
     // Implement the IDL
-    const String& direction() const { return directionToString(m_direction); }
+    const String& direction() const;
     ScriptValue key(ScriptState*);
     ScriptValue primaryKey(ScriptState*);
     ScriptValue value(ScriptState*);
@@ -86,22 +75,22 @@ public:
     void postSuccessHandlerCallback();
     bool isDeleted() const;
     void close();
-    void setValueReady(IDBKey*, IDBKey* primaryKey, PassRefPtr<SharedBuffer> value, PassOwnPtr<Vector<blink::WebBlobInfo> >);
+    void setValueReady(IDBKey*, IDBKey* primaryKey, PassRefPtr<SharedBuffer> value, PassOwnPtr<Vector<WebBlobInfo> >);
     IDBKey* idbPrimaryKey() const { return m_primaryKey; }
     IDBRequest* request() const { return m_request.get(); }
     virtual bool isKeyCursor() const { return true; }
     virtual bool isCursorWithValue() const { return false; }
 
 protected:
-    IDBCursor(PassOwnPtr<blink::WebIDBCursor>, blink::WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
+    IDBCursor(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
 
 private:
     IDBObjectStore* effectiveObjectStore() const;
     void handleBlobAcks();
 
-    OwnPtr<blink::WebIDBCursor> m_backend;
+    OwnPtr<WebIDBCursor> m_backend;
     Member<IDBRequest> m_request;
-    const blink::WebIDBCursorDirection m_direction;
+    const WebIDBCursorDirection m_direction;
     Member<IDBAny> m_source;
     Member<IDBTransaction> m_transaction;
     bool m_gotValue;
@@ -111,9 +100,9 @@ private:
     Member<IDBKey> m_key;
     Member<IDBKey> m_primaryKey;
     RefPtr<SharedBuffer> m_value;
-    OwnPtr<Vector<blink::WebBlobInfo> > m_blobInfo;
+    OwnPtr<Vector<WebBlobInfo> > m_blobInfo;
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // IDBCursor_h