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

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: rebase 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
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..9e9d212b20400f6793ce920da8beb9c7e84135f5
--- /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 from the set of bitmaps whose paths are
+ // 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_

Powered by Google App Engine
This is Rietveld 408576698