Index: chrome/browser/extensions/crx_installer.h |
diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h |
index e9541dec8204defc135dbc6dfef30595eab22ef2..50859709e6b68811e4d2774e25245d21e71e8023 100644 |
--- a/chrome/browser/extensions/crx_installer.h |
+++ b/chrome/browser/extensions/crx_installer.h |
@@ -5,7 +5,10 @@ |
#ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
#define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
+#include <map> |
+#include <set> |
#include <string> |
+#include <vector> |
#include "base/compiler_specific.h" |
#include "base/file_path.h" |
@@ -170,6 +173,8 @@ class CrxInstaller |
error_on_unsupported_requirements_ = val; |
} |
+ void set_preload_sizes(const std::set<int>& sizes) { preload_sizes_ = sizes; } |
+ |
bool did_handle_successfully() const { return did_handle_successfully_; } |
Profile* profile() { return profile_; } |
@@ -225,6 +230,12 @@ class CrxInstaller |
void ReportSuccessFromUIThread(); |
void NotifyCrxInstallComplete(const Extension* extension); |
+ // Runs on File thread. Preload icons if necessary. |
+ void PreloadIcons(); |
+ |
+ // Runs on UI thread. Update extension icon cache with pre-loaded icons. |
+ void CachePreloadedIcons(); |
+ |
// The file we're installing. |
FilePath source_file_; |
@@ -359,6 +370,12 @@ class CrxInstaller |
bool has_requirement_errors_; |
+ // Sizes of the icons that need to be pre-loaded. |
+ std::set<int> preload_sizes_; |
+ |
+ // Maps requested preload icon size to loaded icons. |
+ std::map<int, SkBitmap> preload_map_; |
+ |
DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
}; |