Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 #ifndef IDBIndex_h | 26 #ifndef IDBIndex_h |
| 27 #define IDBIndex_h | 27 #define IDBIndex_h |
| 28 | 28 |
| 29 #include "bindings/v8/ScriptWrappable.h" | 29 #include "bindings/v8/ScriptWrappable.h" |
| 30 #include "modules/indexeddb/IDBCursor.h" | 30 #include "modules/indexeddb/IDBCursor.h" |
| 31 #include "modules/indexeddb/IDBKeyPath.h" | 31 #include "modules/indexeddb/IDBKeyPath.h" |
| 32 #include "modules/indexeddb/IDBKeyRange.h" | 32 #include "modules/indexeddb/IDBKeyRange.h" |
| 33 #include "modules/indexeddb/IDBMetadata.h" | 33 #include "modules/indexeddb/IDBMetadata.h" |
| 34 #include "modules/indexeddb/IDBRequest.h" | 34 #include "modules/indexeddb/IDBRequest.h" |
| 35 #include "public/platform/WebIDBCursor.h" | 35 #include "public/platform/WebIDBCursor.h" |
| 36 #include "public/platform/WebIDBDatabase.h" | 36 #include "public/platform/WebIDBDatabase.h" |
|
jsbell
2014/06/09 16:27:09
Needs to include public/platform/WebIDBTypes.h
Pritam Nikam
2014/06/11 14:07:47
Done.
| |
| 37 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
| 38 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class ExceptionState; | 42 class ExceptionState; |
| 43 class IDBObjectStore; | 43 class IDBObjectStore; |
| 44 | 44 |
| 45 class IDBIndex : public GarbageCollectedFinalized<IDBIndex>, public ScriptWrappa ble { | 45 class IDBIndex : public GarbageCollectedFinalized<IDBIndex>, public ScriptWrappa ble { |
| 46 public: | 46 public: |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 61 IDBRequest* openCursor(ScriptState*, const ScriptValue& key, const String& d irection, ExceptionState&); | 61 IDBRequest* openCursor(ScriptState*, const ScriptValue& key, const String& d irection, ExceptionState&); |
| 62 IDBRequest* openKeyCursor(ScriptState*, const ScriptValue& range, const Stri ng& direction, ExceptionState&); | 62 IDBRequest* openKeyCursor(ScriptState*, const ScriptValue& range, const Stri ng& direction, ExceptionState&); |
| 63 IDBRequest* count(ScriptState*, const ScriptValue& range, ExceptionState&); | 63 IDBRequest* count(ScriptState*, const ScriptValue& range, ExceptionState&); |
| 64 IDBRequest* get(ScriptState*, const ScriptValue& key, ExceptionState&); | 64 IDBRequest* get(ScriptState*, const ScriptValue& key, ExceptionState&); |
| 65 IDBRequest* getKey(ScriptState*, const ScriptValue& key, ExceptionState&); | 65 IDBRequest* getKey(ScriptState*, const ScriptValue& key, ExceptionState&); |
| 66 | 66 |
| 67 void markDeleted() { m_deleted = true; } | 67 void markDeleted() { m_deleted = true; } |
| 68 bool isDeleted() const; | 68 bool isDeleted() const; |
| 69 | 69 |
| 70 // Used internally and by InspectorIndexedDBAgent: | 70 // Used internally and by InspectorIndexedDBAgent: |
| 71 IDBRequest* openCursor(ScriptState*, IDBKeyRange*, blink::WebIDBCursor::Dire ction); | 71 IDBRequest* openCursor(ScriptState*, IDBKeyRange*, blink::Direction); |
| 72 | 72 |
| 73 blink::WebIDBDatabase* backendDB() const; | 73 blink::WebIDBDatabase* backendDB() const; |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 IDBIndex(const IDBIndexMetadata&, IDBObjectStore*, IDBTransaction*); | 76 IDBIndex(const IDBIndexMetadata&, IDBObjectStore*, IDBTransaction*); |
| 77 | 77 |
| 78 IDBRequest* getInternal(ScriptState*, const ScriptValue& key, ExceptionState &, bool keyOnly); | 78 IDBRequest* getInternal(ScriptState*, const ScriptValue& key, ExceptionState &, bool keyOnly); |
| 79 | 79 |
| 80 IDBIndexMetadata m_metadata; | 80 IDBIndexMetadata m_metadata; |
| 81 Member<IDBObjectStore> m_objectStore; | 81 Member<IDBObjectStore> m_objectStore; |
| 82 Member<IDBTransaction> m_transaction; | 82 Member<IDBTransaction> m_transaction; |
| 83 bool m_deleted; | 83 bool m_deleted; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace WebCore | 86 } // namespace WebCore |
| 87 | 87 |
| 88 #endif // IDBIndex_h | 88 #endif // IDBIndex_h |
| OLD | NEW |