| Index: chrome/common/extensions/extension_action.h
|
| diff --git a/chrome/common/extensions/extension_action.h b/chrome/common/extensions/extension_action.h
|
| index 5ea62f3e63e9d883be30089c9def4881ddd9ae6e..40dc0d492f4b51b9dd1b855c3fa2835b6417060e 100644
|
| --- a/chrome/common/extensions/extension_action.h
|
| +++ b/chrome/common/extensions/extension_action.h
|
| @@ -15,12 +15,12 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/observer_list.h"
|
| +#include "chrome/common/extensions/icon_transform.h"
|
| #include "third_party/skia/include/core/SkColor.h"
|
| #include "ui/base/animation/linear_animation.h"
|
|
|
| class GURL;
|
| class SkBitmap;
|
| -class SkDevice;
|
|
|
| namespace gfx {
|
| class Canvas;
|
| @@ -93,8 +93,8 @@ class ExtensionAction {
|
| // ui::LinearAnimation implementation.
|
| virtual void AnimateToState(double state) OVERRIDE;
|
|
|
| - // Device we use to paint icons to.
|
| - mutable scoped_ptr<SkDevice> device_;
|
| + // Transformation to apply to the icon when rendered.
|
| + mutable extensions::IconTransform icon_transform_;
|
|
|
| ObserverList<Observer> observers_;
|
|
|
| @@ -224,6 +224,12 @@ class ExtensionAction {
|
| // Runs an animation on a tab.
|
| void RunIconAnimation(int tab_id);
|
|
|
| + // Renders |icon| in the "visible" state for |tab_id|: if visible then
|
| + // normal, if invisible then faded. This function only makes sense for
|
| + // browser actions; for page actions, not-visibile should imply not showing at
|
| + // all for that tab.
|
| + const SkBitmap& RenderIconVisibility(const SkBitmap& icon, int tab_id) const;
|
| +
|
| private:
|
| template <class T>
|
| struct ValueTraits {
|
| @@ -278,6 +284,9 @@ class ExtensionAction {
|
| // the legacy setIcon({iconIndex:...} method of the page actions API.
|
| std::vector<std::string> icon_paths_;
|
|
|
| + // Transformation to apply to the icon when rendered.
|
| + mutable extensions::IconTransform icon_transform_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ExtensionAction);
|
| };
|
|
|
|
|