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

Side by Side Diff: Source/modules/imagebitmap/ImageBitmapFactories.h

Issue 323293004: Enable Oilpan for ImageBitmapFactories::ImageBitmapLoader by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/modules/imagebitmap/ImageBitmapFactories.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageBitm ap*, int sx, int sy, int sw, int sh, ExceptionState&); 74 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageBitm ap*, int sx, int sy, int sw, int sh, ExceptionState&);
75 75
76 virtual ~ImageBitmapFactories() { } 76 virtual ~ImageBitmapFactories() { }
77 77
78 void trace(Visitor*); 78 void trace(Visitor*);
79 79
80 protected: 80 protected:
81 static const char* supplementName(); 81 static const char* supplementName();
82 82
83 private: 83 private:
84 class ImageBitmapLoader FINAL : public RefCountedWillBeGarbageCollectedFinal ized<ImageBitmapLoader>, public FileReaderLoaderClient { 84 class ImageBitmapLoader FINAL : public GarbageCollectedFinalized<ImageBitmap Loader>, public FileReaderLoaderClient {
85 public: 85 public:
86 static PassRefPtrWillBeRawPtr<ImageBitmapLoader> create(ImageBitmapFacto ries& factory, const IntRect& cropRect, ScriptState* scriptState) 86 static ImageBitmapLoader* create(ImageBitmapFactories& factory, const In tRect& cropRect, ScriptState* scriptState)
87 { 87 {
88 return adoptRefWillBeNoop(new ImageBitmapLoader(factory, cropRect, s criptState)); 88 return new ImageBitmapLoader(factory, cropRect, scriptState);
89 } 89 }
90 90
91 void loadBlobAsync(ExecutionContext*, Blob*); 91 void loadBlobAsync(ExecutionContext*, Blob*);
92 ScriptPromise promise() { return m_resolver->promise(); } 92 ScriptPromise promise() { return m_resolver->promise(); }
93 93
94 void trace(Visitor*); 94 void trace(Visitor*);
95 95
96 virtual ~ImageBitmapLoader() { } 96 virtual ~ImageBitmapLoader() { }
97 97
98 private: 98 private:
(...skipping 11 matching lines...) Expand all
110 RawPtrWillBeMember<ImageBitmapFactories> m_factory; 110 RawPtrWillBeMember<ImageBitmapFactories> m_factory;
111 RefPtr<ScriptPromiseResolverWithContext> m_resolver; 111 RefPtr<ScriptPromiseResolverWithContext> m_resolver;
112 IntRect m_cropRect; 112 IntRect m_cropRect;
113 }; 113 };
114 114
115 static ImageBitmapFactories& from(EventTarget&); 115 static ImageBitmapFactories& from(EventTarget&);
116 116
117 template<class GlobalObject> 117 template<class GlobalObject>
118 static ImageBitmapFactories& fromInternal(GlobalObject&); 118 static ImageBitmapFactories& fromInternal(GlobalObject&);
119 119
120 void addLoader(PassRefPtrWillBeRawPtr<ImageBitmapLoader>); 120 void addLoader(ImageBitmapLoader*);
121 void didFinishLoading(ImageBitmapLoader*); 121 void didFinishLoading(ImageBitmapLoader*);
122 122
123 WillBeHeapHashSet<RefPtrWillBeMember<ImageBitmapLoader> > m_pendingLoaders; 123 PersistentHeapHashSetWillBeHeapHashSet<Member<ImageBitmapLoader> > m_pending Loaders;
124 }; 124 };
125 125
126 } // namespace WebCore 126 } // namespace WebCore
127 127
128 #endif // ImageBitmapFactories_h 128 #endif // ImageBitmapFactories_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/imagebitmap/ImageBitmapFactories.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698