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

Unified Diff: Source/modules/imagebitmap/ImageBitmapFactories.h

Issue 178663004: Oilpan: move WorkerGlobalScope to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove redundant include Created 6 years, 10 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: Source/modules/imagebitmap/ImageBitmapFactories.h
diff --git a/Source/modules/imagebitmap/ImageBitmapFactories.h b/Source/modules/imagebitmap/ImageBitmapFactories.h
index c5e8103cd9da611b992b4bd508c5917195ce4c15..94541ce09e37d80c96ce2aa9e7393c27a6a7b603 100644
--- a/Source/modules/imagebitmap/ImageBitmapFactories.h
+++ b/Source/modules/imagebitmap/ImageBitmapFactories.h
@@ -55,7 +55,7 @@ class ImageBitmap;
class ImageData;
class ExecutionContext;
-class ImageBitmapFactories FINAL : public Supplement<DOMWindow>, public WorkerSupplement {
+class ImageBitmapFactories : public Supplement<DOMWindow> {
haraken 2014/02/27 02:46:01 Keep FINAL.
haraken 2014/02/27 02:46:52 oh, now this is inherited. Ignore this comment.
class ImageBitmapLoader;
@@ -79,6 +79,9 @@ public:
virtual ~ImageBitmapFactories() { }
+protected:
+ static const char* supplementName();
+
private:
class ImageBitmapLoader FINAL : public RefCounted<ImageBitmapLoader>, public FileReaderLoaderClient {
public:
@@ -109,17 +112,27 @@ private:
IntRect m_cropRect;
};
- static const char* supplementName();
static ImageBitmapFactories& from(EventTarget&);
- template <class T>
- static ImageBitmapFactories& fromInternal(T&);
+ static ImageBitmapFactories& fromInternal(DOMWindow&);
void addLoader(PassRefPtr<ImageBitmapLoader>);
HashSet<RefPtr<ImageBitmapLoader> > m_pendingLoaders;
};
+// FIXME: oilpan: remove once DOMWindow and its Supplementable becomes heap allocated.
+class WorkerGlobalScopeImageBitmapFactories FINAL : public NoBaseWillBeGarbageCollectedFinalized<WorkerGlobalScopeImageBitmapFactories>, public ImageBitmapFactories, public WorkerSupplement {
+public:
+ virtual ~WorkerGlobalScopeImageBitmapFactories() { }
+
+ virtual void trace(Visitor*);
+
+private:
+ friend class ImageBitmapFactories;
+ static ImageBitmapFactories& fromInternal(WorkerGlobalScope&);
+};
+
} // namespace WebCore
#endif // ImageBitmapFactories_h

Powered by Google App Engine
This is Rietveld 408576698