| 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 28 matching lines...) Expand all Loading... |
| 39 class IDBCursor; | 39 class IDBCursor; |
| 40 class IDBCursorWithValue; | 40 class IDBCursorWithValue; |
| 41 class IDBDatabase; | 41 class IDBDatabase; |
| 42 class IDBIndex; | 42 class IDBIndex; |
| 43 class IDBObjectStore; | 43 class IDBObjectStore; |
| 44 class WebBlobInfo; | 44 class WebBlobInfo; |
| 45 | 45 |
| 46 // IDBAny is used for: | 46 // IDBAny is used for: |
| 47 // * source of IDBCursor (IDBObjectStore or IDBIndex) | 47 // * source of IDBCursor (IDBObjectStore or IDBIndex) |
| 48 // * source of IDBRequest (IDBObjectStore, IDBIndex, IDBCursor, or null) | 48 // * source of IDBRequest (IDBObjectStore, IDBIndex, IDBCursor, or null) |
| 49 // * result of IDBRequest (IDBDatabase, IDBCursor, DOMStringList, undefined, in
teger, key or value) | 49 // * result of IDBRequest (IDBDatabase, IDBCursor, DOMStringList, undefined, |
| 50 // integer, key or value) |
| 50 // | 51 // |
| 51 // This allows for lazy conversion to script values (via IDBBindingUtilities), | 52 // This allows for lazy conversion to script values (via IDBBindingUtilities), |
| 52 // and avoids the need for many dedicated union types. | 53 // and avoids the need for many dedicated union types. |
| 53 | 54 |
| 54 class MODULES_EXPORT IDBAny : public GarbageCollectedFinalized<IDBAny> { | 55 class MODULES_EXPORT IDBAny : public GarbageCollectedFinalized<IDBAny> { |
| 55 public: | 56 public: |
| 56 static IDBAny* createUndefined(); | 57 static IDBAny* createUndefined(); |
| 57 static IDBAny* createNull(); | 58 static IDBAny* createNull(); |
| 58 template <typename T> | 59 template <typename T> |
| 59 static IDBAny* create(T* idbObject) { | 60 static IDBAny* create(T* idbObject) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 const Member<IDBObjectStore> m_idbObjectStore; | 124 const Member<IDBObjectStore> m_idbObjectStore; |
| 124 const Member<IDBKey> m_idbKey; | 125 const Member<IDBKey> m_idbKey; |
| 125 const RefPtr<IDBValue> m_idbValue; | 126 const RefPtr<IDBValue> m_idbValue; |
| 126 const Vector<RefPtr<IDBValue>> m_idbValues; | 127 const Vector<RefPtr<IDBValue>> m_idbValues; |
| 127 const int64_t m_integer = 0; | 128 const int64_t m_integer = 0; |
| 128 }; | 129 }; |
| 129 | 130 |
| 130 } // namespace blink | 131 } // namespace blink |
| 131 | 132 |
| 132 #endif // IDBAny_h | 133 #endif // IDBAny_h |
| OLD | NEW |