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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h

Issue 1865213006: Replace setIndexedDBClientCreateFunction madness with Supplements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify per review feedback 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h b/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h
index 4ba619004a99819e3cb8a31456337cc8e06dc44f..560726b4d79d4dd6d5de774375faab104d13d1af 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h
@@ -29,24 +29,34 @@
#define IndexedDBClient_h
#include "modules/ModulesExport.h"
+#include "platform/Supplementable.h"
#include "platform/heap/Handle.h"
#include "wtf/text/WTFString.h"
namespace blink {
class ExecutionContext;
+class LocalFrame;
+class WorkerClients;
-class IndexedDBClient : public GarbageCollected<IndexedDBClient> {
+class MODULES_EXPORT IndexedDBClient : public Supplement<LocalFrame>, public Supplement<WorkerClients>, public GarbageCollectedFinalized<IndexedDBClient> {
+ USING_GARBAGE_COLLECTED_MIXIN(IndexedDBClient);
+ WTF_MAKE_NONCOPYABLE(IndexedDBClient);
public:
- static IndexedDBClient* create();
+ IndexedDBClient();
+ virtual ~IndexedDBClient() {}
+
DEFINE_INLINE_VIRTUAL_TRACE() { }
virtual bool allowIndexedDB(ExecutionContext*, const String& name) = 0;
+
+ static IndexedDBClient* from(ExecutionContext*);
+ static const char* supplementName();
};
-typedef IndexedDBClient* CreateIndexedDBClient();
+MODULES_EXPORT void provideIndexedDBClientTo(LocalFrame&, IndexedDBClient*);
-MODULES_EXPORT void setIndexedDBClientCreateFunction(CreateIndexedDBClient);
+MODULES_EXPORT void provideIndexedDBClientToWorker(WorkerClients*, IndexedDBClient*);
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698