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

Unified Diff: third_party/WebKit/Source/core/html/imports/HTMLImportsController.h

Issue 1914183002: Simplify ownership handling of HTMLImportsController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: drop Finalized 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/core/html/imports/HTMLImportsController.h
diff --git a/third_party/WebKit/Source/core/html/imports/HTMLImportsController.h b/third_party/WebKit/Source/core/html/imports/HTMLImportsController.h
index f0c1b2d6d305b83d498e0985d6edcc6696e7558f..086902b194132f6909b7462356623123b56381af 100644
--- a/third_party/WebKit/Source/core/html/imports/HTMLImportsController.h
+++ b/third_party/WebKit/Source/core/html/imports/HTMLImportsController.h
@@ -46,17 +46,14 @@ class HTMLImportLoader;
class HTMLImportTreeRoot;
class KURL;
-class HTMLImportsController final : public GarbageCollectedFinalized<HTMLImportsController>, public Supplement<Document> {
- USING_GARBAGE_COLLECTED_MIXIN(HTMLImportsController);
+class HTMLImportsController final : public GarbageCollected<HTMLImportsController> {
public:
- static const char* supplementName();
- static void provideTo(Document&);
- static void removeFrom(Document&);
+ static HTMLImportsController* create(Document& master)
+ {
+ return new HTMLImportsController(master);
+ }
- explicit HTMLImportsController(Document&);
- virtual ~HTMLImportsController();
-
- HTMLImportTreeRoot* root() const { return m_root.get(); }
+ HTMLImportTreeRoot* root() const { return m_root; }
bool shouldBlockScriptExecution(const Document&) const;
HTMLImportChild* load(HTMLImport* parent, HTMLImportChildClient*, FetchRequest);
@@ -66,16 +63,18 @@ public:
HTMLImportLoader* createLoader();
size_t loaderCount() const { return m_loaders.size(); }
- HTMLImportLoader* loaderAt(size_t i) const { return m_loaders[i].get(); }
+ HTMLImportLoader* loaderAt(size_t i) const { return m_loaders[i]; }
Document* loaderDocumentAt(size_t) const;
HTMLImportLoader* loaderFor(const Document&) const;
- DECLARE_VIRTUAL_TRACE();
+ DECLARE_TRACE();
+
+ void dispose();
private:
- HTMLImportChild* createChild(const KURL&, HTMLImportLoader*, HTMLImport* parent, HTMLImportChildClient*);
+ explicit HTMLImportsController(Document&);
- void dispose();
+ HTMLImportChild* createChild(const KURL&, HTMLImportLoader*, HTMLImport* parent, HTMLImportChildClient*);
Member<HTMLImportTreeRoot> m_root;
using LoaderList = HeapVector<Member<HTMLImportLoader>>;
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/html/imports/HTMLImportsController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698