Index: chrome/browser/icon_loader.h |
diff --git a/chrome/browser/icon_loader.h b/chrome/browser/icon_loader.h |
index ff22c7a056c8995ca6952fbac554d5263c05e70e..4ed9f4b0973751ee0c9e133f06b820dfe5a5fb2e 100644 |
--- a/chrome/browser/icon_loader.h |
+++ b/chrome/browser/icon_loader.h |
@@ -10,6 +10,7 @@ |
#include <string> |
#include "base/basictypes.h" |
+#include "base/file_path.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/message_loop_proxy.h" |
@@ -44,13 +45,22 @@ class IconLoader : public base::RefCountedThreadSafe<IconLoader> { |
// Invoked when an icon has been read. |source| is the IconLoader. If the |
// icon has been successfully loaded, result is non-null. This method must |
// return true if it is taking ownership of the returned image. |
- virtual bool OnImageLoaded(IconLoader* source, gfx::Image* result) = 0; |
+ virtual bool OnImageLoaded(IconLoader* source, |
+ gfx::Image* result, |
+ const IconGroupID& group) = 0; |
+ |
+ // Invoked when an icon group has been read, but before the icon data |
+ // is read. If the icon is already cached, this method returns true. |
Robert Sesek
2013/02/12 16:49:25
What does this class do if the method returns true
shatch
2013/02/13 16:14:52
Done.
|
+ virtual bool OnGroupLoaded(IconLoader* source, |
Robert Sesek
2013/02/12 16:49:25
Since this happens before OnImageLoaded, put it be
shatch
2013/02/13 16:14:52
Done.
|
+ const IconGroupID& group) = 0; |
protected: |
virtual ~Delegate() {} |
}; |
- IconLoader(const IconGroupID& group, IconSize size, Delegate* delegate); |
+ IconLoader(const base::FilePath& file_path, |
+ IconSize size, |
+ Delegate* delegate); |
// Start reading the icon on the file thread. |
void Start(); |
@@ -60,14 +70,16 @@ class IconLoader : public base::RefCountedThreadSafe<IconLoader> { |
virtual ~IconLoader(); |
- void ReadIcon(); |
+ void ReadIcon(const IconGroupID& group); |
+ void ReadGroup(IconGroupID* group); |
Robert Sesek
2013/02/12 16:49:25
Same comment about ordering.
shatch
2013/02/13 16:14:52
Done.
|
+ void OnReadGroup(const IconGroupID* group); |
- void NotifyDelegate(); |
+ void NotifyDelegate(const IconGroupID& group); |
// The message loop object of the thread in which we notify the delegate. |
scoped_refptr<base::MessageLoopProxy> target_message_loop_; |
- IconGroupID group_; |
+ base::FilePath file_path_; |
IconSize icon_size_; |