Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBFactory.h

Issue 1865213006: Replace setIndexedDBClientCreateFunction madness with Supplements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 12 matching lines...) Expand all
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 #ifndef IDBFactory_h 28 #ifndef IDBFactory_h
29 #define IDBFactory_h 29 #define IDBFactory_h
30 30
31 #include "bindings/core/v8/ScriptWrappable.h" 31 #include "bindings/core/v8/ScriptWrappable.h"
32 #include "modules/indexeddb/IDBOpenDBRequest.h" 32 #include "modules/indexeddb/IDBOpenDBRequest.h"
33 #include "modules/indexeddb/IndexedDBClient.h"
34 #include "platform/heap/Handle.h" 33 #include "platform/heap/Handle.h"
35 #include "wtf/text/WTFString.h" 34 #include "wtf/text/WTFString.h"
36 35
37 namespace blink { 36 namespace blink {
38 37
39 class ExceptionState; 38 class ExceptionState;
40 class ScriptState; 39 class ScriptState;
41 40
42 class IDBFactory final : public GarbageCollected<IDBFactory>, public ScriptWrapp able { 41 class IDBFactory final : public GarbageCollected<IDBFactory>, public ScriptWrapp able {
43 DEFINE_WRAPPERTYPEINFO(); 42 DEFINE_WRAPPERTYPEINFO();
44 public: 43 public:
45 static IDBFactory* create(IndexedDBClient* client) 44 static IDBFactory* create()
46 { 45 {
47 return new IDBFactory(client); 46 return new IDBFactory();
48 } 47 }
49 DECLARE_TRACE(); 48 DEFINE_INLINE_VIRTUAL_TRACE() { }
50 49
51 IDBRequest* getDatabaseNames(ScriptState*, ExceptionState&); 50 IDBRequest* getDatabaseNames(ScriptState*, ExceptionState&);
52 51
53 IDBOpenDBRequest* open(ScriptState*, const String& name, ExceptionState&); 52 IDBOpenDBRequest* open(ScriptState*, const String& name, ExceptionState&);
54 IDBOpenDBRequest* open(ScriptState*, const String& name, unsigned long long version, ExceptionState&); 53 IDBOpenDBRequest* open(ScriptState*, const String& name, unsigned long long version, ExceptionState&);
55 IDBOpenDBRequest* deleteDatabase(ScriptState*, const String& name, Exception State&); 54 IDBOpenDBRequest* deleteDatabase(ScriptState*, const String& name, Exception State&);
56 55
57 short cmp(ScriptState*, const ScriptValue& first, const ScriptValue& second, ExceptionState&); 56 short cmp(ScriptState*, const ScriptValue& first, const ScriptValue& second, ExceptionState&);
58 57
59 private: 58 private:
60 explicit IDBFactory(IndexedDBClient*); 59 IDBFactory();
61 60
62 IDBOpenDBRequest* openInternal(ScriptState*, const String& name, int64_t ver sion, ExceptionState&); 61 IDBOpenDBRequest* openInternal(ScriptState*, const String& name, int64_t ver sion, ExceptionState&);
63
64 Member<IndexedDBClient> m_permissionClient;
65 }; 62 };
66 63
67 } // namespace blink 64 } // namespace blink
68 65
69 #endif // IDBFactory_h 66 #endif // IDBFactory_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698