OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 static ScriptPromise createImageBitmap(EventTarget&, Blob*, int sx, int sy,
int sw, int sh, ExceptionState&); | 72 static ScriptPromise createImageBitmap(EventTarget&, Blob*, int sx, int sy,
int sw, int sh, ExceptionState&); |
73 static ScriptPromise createImageBitmap(EventTarget&, ImageData*, ExceptionSt
ate&); | 73 static ScriptPromise createImageBitmap(EventTarget&, ImageData*, ExceptionSt
ate&); |
74 static ScriptPromise createImageBitmap(EventTarget&, ImageData*, int sx, int
sy, int sw, int sh, ExceptionState&); | 74 static ScriptPromise createImageBitmap(EventTarget&, ImageData*, int sx, int
sy, int sw, int sh, ExceptionState&); |
75 static ScriptPromise createImageBitmap(EventTarget&, ImageBitmap*, Exception
State&); | 75 static ScriptPromise createImageBitmap(EventTarget&, ImageBitmap*, Exception
State&); |
76 static ScriptPromise createImageBitmap(EventTarget&, ImageBitmap*, int sx, i
nt sy, int sw, int sh, ExceptionState&); | 76 static ScriptPromise createImageBitmap(EventTarget&, ImageBitmap*, int sx, i
nt sy, int sw, int sh, ExceptionState&); |
77 | 77 |
78 void didFinishLoading(ImageBitmapLoader*); | 78 void didFinishLoading(ImageBitmapLoader*); |
79 | 79 |
80 virtual ~ImageBitmapFactories() { } | 80 virtual ~ImageBitmapFactories() { } |
81 | 81 |
| 82 virtual void trace(Visitor*); |
| 83 |
82 private: | 84 private: |
83 class ImageBitmapLoader FINAL : public RefCounted<ImageBitmapLoader>, public
FileReaderLoaderClient { | 85 class ImageBitmapLoader FINAL : public RefCounted<ImageBitmapLoader>, public
FileReaderLoaderClient { |
84 public: | 86 public: |
85 static PassRefPtr<ImageBitmapLoader> create(ImageBitmapFactories& factor
y, PassRefPtr<ScriptPromiseResolver> resolver, const IntRect& cropRect) | 87 static PassRefPtr<ImageBitmapLoader> create(ImageBitmapFactories& factor
y, PassRefPtr<ScriptPromiseResolver> resolver, const IntRect& cropRect) |
86 { | 88 { |
87 return adoptRef(new ImageBitmapLoader(factory, resolver, cropRect)); | 89 return adoptRef(new ImageBitmapLoader(factory, resolver, cropRect)); |
88 } | 90 } |
89 | 91 |
90 void loadBlobAsync(ExecutionContext*, Blob*); | 92 void loadBlobAsync(ExecutionContext*, Blob*); |
91 | 93 |
(...skipping 21 matching lines...) Expand all Loading... |
113 static ImageBitmapFactories& from(EventTarget&); | 115 static ImageBitmapFactories& from(EventTarget&); |
114 | 116 |
115 template <class T> | 117 template <class T> |
116 static ImageBitmapFactories& fromInternal(T&); | 118 static ImageBitmapFactories& fromInternal(T&); |
117 | 119 |
118 void addLoader(PassRefPtr<ImageBitmapLoader>); | 120 void addLoader(PassRefPtr<ImageBitmapLoader>); |
119 | 121 |
120 HashSet<RefPtr<ImageBitmapLoader> > m_pendingLoaders; | 122 HashSet<RefPtr<ImageBitmapLoader> > m_pendingLoaders; |
121 }; | 123 }; |
122 | 124 |
| 125 template<> |
| 126 ImageBitmapFactories& ImageBitmapFactories::fromInternal(WorkerGlobalScope&); |
| 127 |
123 } // namespace WebCore | 128 } // namespace WebCore |
124 | 129 |
125 #endif // ImageBitmapFactories_h | 130 #endif // ImageBitmapFactories_h |
OLD | NEW |