| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_ICON_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_ICON_FACTORY_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_ICON_FACTORY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_ICON_FACTORY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // If there is an icon set using |SetIcon|, that icon is returned. | 48 // If there is an icon set using |SetIcon|, that icon is returned. |
| 49 // Else, if there is a default icon set for the extension action, the icon is | 49 // Else, if there is a default icon set for the extension action, the icon is |
| 50 // created using IconImage. Observer is triggered wheniever the icon gets | 50 // created using IconImage. Observer is triggered wheniever the icon gets |
| 51 // updated. | 51 // updated. |
| 52 // Else, extension favicon is returned. | 52 // Else, extension favicon is returned. |
| 53 // In all cases, action's attention and animation icon transformations are | 53 // In all cases, action's attention and animation icon transformations are |
| 54 // applied on the icon. | 54 // applied on the icon. |
| 55 gfx::Image GetIcon(int tab_id); | 55 gfx::Image GetIcon(int tab_id); |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 const extensions::Extension* extension_; | |
| 59 const ExtensionAction* action_; | 58 const ExtensionAction* action_; |
| 60 Observer* observer_; | 59 Observer* observer_; |
| 61 | 60 |
| 62 ScopedObserver<extensions::IconImage, extensions::IconImage::Observer> | 61 ScopedObserver<extensions::IconImage, extensions::IconImage::Observer> |
| 63 icon_image_observer_; | 62 icon_image_observer_; |
| 64 | 63 |
| 65 DISALLOW_COPY_AND_ASSIGN(ExtensionActionIconFactory); | 64 DISALLOW_COPY_AND_ASSIGN(ExtensionActionIconFactory); |
| 66 }; | 65 }; |
| 67 | 66 |
| 68 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_ICON_FACTORY_H_ | 67 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_ICON_FACTORY_H_ |
| OLD | NEW |