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

Unified Diff: chrome/browser/extensions/image_loading_tracker.h

Issue 1167004: Adds the source ImageLoadingTracker to OnImageLoaded. I need this in a (Closed)
Patch Set: Created 10 years, 9 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
« no previous file with comments | « chrome/browser/cocoa/location_bar_view_mac.mm ('k') | chrome/browser/extensions/image_loading_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/image_loading_tracker.h
diff --git a/chrome/browser/extensions/image_loading_tracker.h b/chrome/browser/extensions/image_loading_tracker.h
index 23f7b71c463cdff49a1b6e4c7eb63656dc6fe033..c908bab594e32b01a8ce300efaf929f4393117b9 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).
« no previous file with comments | « chrome/browser/cocoa/location_bar_view_mac.mm ('k') | chrome/browser/extensions/image_loading_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698