| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #include "bindings/v8/ScriptWrappable.h" | 31 #include "bindings/v8/ScriptWrappable.h" |
| 32 #include "modules/indexeddb/IDBOpenDBRequest.h" | 32 #include "modules/indexeddb/IDBOpenDBRequest.h" |
| 33 #include "wtf/PassRefPtr.h" | 33 #include "wtf/PassRefPtr.h" |
| 34 #include "wtf/RefCounted.h" | 34 #include "wtf/RefCounted.h" |
| 35 #include "wtf/RefPtr.h" | 35 #include "wtf/RefPtr.h" |
| 36 #include "wtf/text/WTFString.h" | 36 #include "wtf/text/WTFString.h" |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 class ExceptionState; |
| 41 class IDBFactoryBackendInterface; |
| 40 class IDBKey; | 42 class IDBKey; |
| 41 class IDBKeyRange; | 43 class IDBKeyRange; |
| 42 class IDBFactoryBackendInterface; | |
| 43 class ScriptExecutionContext; | 44 class ScriptExecutionContext; |
| 44 | 45 |
| 45 typedef int ExceptionCode; | |
| 46 | |
| 47 class IDBFactory : public ScriptWrappable, public RefCounted<IDBFactory> { | 46 class IDBFactory : public ScriptWrappable, public RefCounted<IDBFactory> { |
| 48 public: | 47 public: |
| 49 static PassRefPtr<IDBFactory> create(IDBFactoryBackendInterface* factory) | 48 static PassRefPtr<IDBFactory> create(IDBFactoryBackendInterface* factory) |
| 50 { | 49 { |
| 51 return adoptRef(new IDBFactory(factory)); | 50 return adoptRef(new IDBFactory(factory)); |
| 52 } | 51 } |
| 53 ~IDBFactory(); | 52 ~IDBFactory(); |
| 54 | 53 |
| 55 PassRefPtr<IDBRequest> getDatabaseNames(ScriptExecutionContext*, ExceptionCo
de&); | 54 PassRefPtr<IDBRequest> getDatabaseNames(ScriptExecutionContext*, ExceptionSt
ate&); |
| 56 | 55 |
| 57 PassRefPtr<IDBOpenDBRequest> open(ScriptExecutionContext*, const String& nam
e, ExceptionCode&); | 56 PassRefPtr<IDBOpenDBRequest> open(ScriptExecutionContext*, const String& nam
e, ExceptionState&); |
| 58 PassRefPtr<IDBOpenDBRequest> open(ScriptExecutionContext*, const String& nam
e, unsigned long long version, ExceptionCode&); | 57 PassRefPtr<IDBOpenDBRequest> open(ScriptExecutionContext*, const String& nam
e, unsigned long long version, ExceptionState&); |
| 59 PassRefPtr<IDBOpenDBRequest> deleteDatabase(ScriptExecutionContext*, const S
tring& name, ExceptionCode&); | 58 PassRefPtr<IDBOpenDBRequest> deleteDatabase(ScriptExecutionContext*, const S
tring& name, ExceptionState&); |
| 60 | 59 |
| 61 short cmp(ScriptExecutionContext*, const ScriptValue& first, const ScriptVal
ue& second, ExceptionCode&); | 60 short cmp(ScriptExecutionContext*, const ScriptValue& first, const ScriptVal
ue& second, ExceptionState&); |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 IDBFactory(IDBFactoryBackendInterface*); | 63 IDBFactory(IDBFactoryBackendInterface*); |
| 65 | 64 |
| 66 PassRefPtr<IDBOpenDBRequest> openInternal(ScriptExecutionContext*, const Str
ing& name, int64_t version, ExceptionCode&); | 65 PassRefPtr<IDBOpenDBRequest> openInternal(ScriptExecutionContext*, const Str
ing& name, int64_t version, ExceptionState&); |
| 67 | 66 |
| 68 RefPtr<IDBFactoryBackendInterface> m_backend; | 67 RefPtr<IDBFactoryBackendInterface> m_backend; |
| 69 }; | 68 }; |
| 70 | 69 |
| 71 } // namespace WebCore | 70 } // namespace WebCore |
| 72 | 71 |
| 73 #endif // IDBFactory_h | 72 #endif // IDBFactory_h |
| OLD | NEW |