summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/image_loading_tracker.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/image_loading_tracker.h')
-rw-r--r--chrome/browser/extensions/image_loading_tracker.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/extensions/image_loading_tracker.h b/chrome/browser/extensions/image_loading_tracker.h
index 23f7b71..c908bab 100644
--- a/chrome/browser/extensions/image_loading_tracker.h
+++ b/chrome/browser/extensions/image_loading_tracker.h
@@ -21,18 +21,22 @@ class Size;
// Consider abstracting out a FilePathProvider (ExtensionResource) and moving
// back to chrome/browser/ if other subsystems want to use it.
class ImageLoadingTracker
- : public base::RefCountedThreadSafe<ImageLoadingTracker> {
+ : public base::RefCountedThreadSafe<ImageLoadingTracker> {
public:
class Observer {
public:
// Will be called when the image with the given index has loaded.
// The |image| is owned by the tracker, so the observer should make a copy
// if they need to access it after this call.
- virtual void OnImageLoaded(SkBitmap* image, size_t index) = 0;
+ virtual void OnImageLoaded(ImageLoadingTracker* source,
+ SkBitmap* image,
+ size_t index) = 0;
};
ImageLoadingTracker(Observer* observer, size_t image_count)
- : observer_(observer), image_count_(image_count), posted_count_(0) {
+ : observer_(observer),
+ image_count_(image_count),
+ posted_count_(0) {
AddRef(); // We hold on to a reference to ourself to make sure we don't
// get deleted until we get a response from image loading (see
// ImageLoadingDone).