Index: chrome/common/extensions/extension_icon_factory_delegate.h |
diff --git a/chrome/common/extensions/extension_icon_factory_delegate.h b/chrome/common/extensions/extension_icon_factory_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8ecd56362468a659c1f801f6aa3cbdb636f5ff80 |
--- /dev/null |
+++ b/chrome/common/extensions/extension_icon_factory_delegate.h |
@@ -0,0 +1,26 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_ICON_FACTORY_DELEGATE_H_ |
+#define CHROME_COMMON_EXTENSIONS_EXTENSION_ICON_FACTORY_DELEGATE_H_ |
+ |
+#include "chrome/common/extensions/extension_icon_set.h" |
+ |
+namespace gfx { |
+class ImageSkia; |
+} |
+ |
+// Used by code living in chrome/common/ to delegate icon creation when the icon |
+// creation cannot be done from chrome/common/ (e.g. if the icon is loaded |
+// asynchronously using ImageLoadingTracker). |
+class ExtensionIconFactoryDelegate { |
+ public: |
+ virtual ~ExtensionIconFactoryDelegate() {} |
+ |
+ // Should create icon of desired size from icon paths defined in |icon_set|. |
+ virtual gfx::ImageSkia GetIcon(const ExtensionIconSet* icon_set, |
+ int desired_size) = 0; |
Jeffrey Yasskin
2012/09/13 00:23:36
Still trying to get my head around the meaning of
tbarzic
2012/09/13 02:01:01
Done.
|
+}; |
+ |
+#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_ICON_FACTORY_DELEGATE_H_ |