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

Unified Diff: chrome/browser/icon_loader.h

Issue 113120: stub impl of linux,mac icon loader/manager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: style fixes Created 11 years, 7 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/browser.vcproj ('k') | chrome/browser/icon_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/icon_loader.h
===================================================================
--- chrome/browser/icon_loader.h (revision 15577)
+++ chrome/browser/icon_loader.h (working copy)
@@ -11,6 +11,16 @@
#include "base/file_path.h"
#include "base/ref_counted.h"
+#if defined(OS_WIN)
+// On Windows, we group files by their extension, with several exceptions:
+// .dll, .exe, .ico. See IconManager.h for explanation.
+typedef std::wstring IconGroupID;
+#elif defined(OS_POSIX)
+// On POSIX, we group files by MIME type.
+typedef std::string IconGroupID;
+#endif
+
+class MessageLoop;
class SkBitmap;
////////////////////////////////////////////////////////////////////////////////
@@ -35,18 +45,29 @@
virtual bool OnBitmapLoaded(IconLoader* source, SkBitmap* result) = 0;
};
- IconLoader() { }
+ IconLoader(const IconGroupID& group, IconSize size, Delegate* delegate);
- virtual ~IconLoader() { }
+ virtual ~IconLoader();
// Start reading the icon on the file thread.
- virtual void Start() = 0;
+ void Start();
- // Factory method for returning a platform specific IconLoad.
- static IconLoader* Create(const FilePath& path, IconSize size,
- Delegate* delegate);
+ private:
+ void ReadIcon();
- private:
+ void NotifyDelegate();
+
+ // The message loop object of the thread in which we notify the delegate.
+ MessageLoop* target_message_loop_;
+
+ IconGroupID group_;
+
+ IconSize icon_size_;
+
+ SkBitmap* bitmap_;
+
+ Delegate* delegate_;
+
DISALLOW_COPY_AND_ASSIGN(IconLoader);
};
« no previous file with comments | « chrome/browser/browser.vcproj ('k') | chrome/browser/icon_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698