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 ScriptState; | 39 class ScriptState; |
40 | 40 |
41 class IDBFactory final : public GarbageCollected<IDBFactory>, | 41 class IDBFactory final : public GarbageCollected<IDBFactory>, |
42 public ScriptWrappable { | 42 public ScriptWrappable { |
43 DEFINE_WRAPPERTYPEINFO(); | 43 DEFINE_WRAPPERTYPEINFO(); |
44 | 44 |
45 public: | 45 public: |
46 static IDBFactory* Create() { return new IDBFactory(); } | 46 static IDBFactory* Create() { return new IDBFactory(); } |
47 DEFINE_INLINE_VIRTUAL_TRACE() {} | 47 DEFINE_INLINE_VIRTUAL_TRACE() {} |
48 | 48 |
49 IDBRequest* getDatabaseNames(ScriptState*, ExceptionState&); | 49 // Implement the IDBFactory IDL |
50 | |
51 IDBOpenDBRequest* open(ScriptState*, const String& name, ExceptionState&); | 50 IDBOpenDBRequest* open(ScriptState*, const String& name, ExceptionState&); |
52 IDBOpenDBRequest* open(ScriptState*, | 51 IDBOpenDBRequest* open(ScriptState*, |
53 const String& name, | 52 const String& name, |
54 unsigned long long version, | 53 unsigned long long version, |
55 ExceptionState&); | 54 ExceptionState&); |
56 IDBOpenDBRequest* deleteDatabase(ScriptState*, | 55 IDBOpenDBRequest* deleteDatabase(ScriptState*, |
57 const String& name, | 56 const String& name, |
58 ExceptionState&); | 57 ExceptionState&); |
59 | |
60 // This is currently not exposed to the web applications and is only used by | |
61 // the DevTools. | |
62 IDBOpenDBRequest* CloseConnectionsAndDeleteDatabase(ScriptState*, | |
63 const String& name, | |
64 ExceptionState&); | |
65 | |
66 short cmp(ScriptState*, | 58 short cmp(ScriptState*, |
67 const ScriptValue& first, | 59 const ScriptValue& first, |
68 const ScriptValue& second, | 60 const ScriptValue& second, |
69 ExceptionState&); | 61 ExceptionState&); |
70 | 62 |
| 63 // These are not exposed to the web applications and only used by DevTools. |
| 64 IDBRequest* GetDatabaseNames(ScriptState*); |
| 65 IDBOpenDBRequest* CloseConnectionsAndDeleteDatabase(ScriptState*, |
| 66 const String& name); |
| 67 |
71 private: | 68 private: |
72 IDBFactory(); | 69 IDBFactory(); |
73 | 70 |
74 IDBOpenDBRequest* OpenInternal(ScriptState*, | 71 IDBOpenDBRequest* OpenInternal(ScriptState*, |
75 const String& name, | 72 const String& name, |
76 int64_t version, | 73 int64_t version, |
77 ExceptionState&); | 74 ExceptionState&); |
78 | 75 |
79 IDBOpenDBRequest* DeleteDatabaseInternal(ScriptState*, | 76 IDBOpenDBRequest* DeleteDatabaseInternal(ScriptState*, |
80 const String& name, | 77 const String& name, |
81 ExceptionState&, | |
82 bool); | 78 bool); |
83 }; | 79 }; |
84 | 80 |
85 } // namespace blink | 81 } // namespace blink |
86 | 82 |
87 #endif // IDBFactory_h | 83 #endif // IDBFactory_h |
OLD | NEW |