| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSION_ICON_IMAGE_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_ICON_IMAGE_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_ICON_IMAGE_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_ICON_IMAGE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // content::NotificationObserver overrides: | 98 // content::NotificationObserver overrides: |
| 99 void Observe(int type, | 99 void Observe(int type, |
| 100 const content::NotificationSource& source, | 100 const content::NotificationSource& source, |
| 101 const content::NotificationDetails& details) override; | 101 const content::NotificationDetails& details) override; |
| 102 | 102 |
| 103 content::BrowserContext* browser_context_; | 103 content::BrowserContext* browser_context_; |
| 104 const Extension* extension_; | 104 const Extension* extension_; |
| 105 const ExtensionIconSet& icon_set_; | 105 const ExtensionIconSet& icon_set_; |
| 106 const int resource_size_in_dip_; | 106 const int resource_size_in_dip_; |
| 107 | 107 |
| 108 ObserverList<Observer> observers_; | 108 base::ObserverList<Observer> observers_; |
| 109 | 109 |
| 110 Source* source_; // Owned by ImageSkia storage. | 110 Source* source_; // Owned by ImageSkia storage. |
| 111 gfx::ImageSkia image_skia_; | 111 gfx::ImageSkia image_skia_; |
| 112 // The icon with whose representation |image_skia_| should be updated if | 112 // The icon with whose representation |image_skia_| should be updated if |
| 113 // its own representation load fails. | 113 // its own representation load fails. |
| 114 gfx::ImageSkia default_icon_; | 114 gfx::ImageSkia default_icon_; |
| 115 | 115 |
| 116 // The image wrapper around |image_skia_|. | 116 // The image wrapper around |image_skia_|. |
| 117 // Note: this is reset each time a new representation is loaded. | 117 // Note: this is reset each time a new representation is loaded. |
| 118 gfx::Image image_; | 118 gfx::Image image_; |
| 119 | 119 |
| 120 content::NotificationRegistrar registrar_; | 120 content::NotificationRegistrar registrar_; |
| 121 | 121 |
| 122 base::WeakPtrFactory<IconImage> weak_ptr_factory_; | 122 base::WeakPtrFactory<IconImage> weak_ptr_factory_; |
| 123 | 123 |
| 124 DISALLOW_COPY_AND_ASSIGN(IconImage); | 124 DISALLOW_COPY_AND_ASSIGN(IconImage); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace extensions | 127 } // namespace extensions |
| 128 | 128 |
| 129 #endif // EXTENSIONS_BROWSER_EXTENSION_ICON_IMAGE_H_ | 129 #endif // EXTENSIONS_BROWSER_EXTENSION_ICON_IMAGE_H_ |
| OLD | NEW |