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

Unified Diff: chrome/common/extensions/extension_icon_factory_delegate.h

Issue 10905005: Change browser/page action default icon defined in manifest to support hidpi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review feedback Created 8 years, 3 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/common/extensions/extension_file_util.cc ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ac848a8c7a4658efecaaf13da8566cc0e7647399
--- /dev/null
+++ b/chrome/common/extensions/extension_icon_factory_delegate.h
@@ -0,0 +1,32 @@
+// 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;
+class Size;
+}
+
+// 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() {}
+
+ // Creates an icon of |desired_size| in device independent pixels, whose
+ // image representations are selected fromi the set of bitmaps whose paths are
tbarzic 2012/09/13 02:01:01 s/fromi/from
+ // in |icon_set|.
+ // The icon will be created asyncronously, so |ExtensionIconFactoryDelegate|
+ // implementation will have to be observable for the created icon changes by
+ // the code that uses the icon.
+ virtual gfx::ImageSkia GetIcon(const ExtensionIconSet* icon_set,
+ const gfx::Size& desired_size) = 0;
+};
+
+#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_ICON_FACTORY_DELEGATE_H_
« no previous file with comments | « chrome/common/extensions/extension_file_util.cc ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698