| 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_
|
|
|