| 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_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 virtual std::string GetMimeType(const std::string&) const OVERRIDE; | 71 virtual std::string GetMimeType(const std::string&) const OVERRIDE; |
| 72 | 72 |
| 73 virtual void StartDataRequest(const std::string& path, | 73 virtual void StartDataRequest(const std::string& path, |
| 74 bool is_incognito, | 74 bool is_incognito, |
| 75 int request_id) OVERRIDE; | 75 int request_id) OVERRIDE; |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 // Encapsulates the request parameters for |request_id|. | 78 // Encapsulates the request parameters for |request_id|. |
| 79 struct ExtensionIconRequest; | 79 struct ExtensionIconRequest; |
| 80 | 80 |
| 81 // Returns the bitmap for the webstore icon. | |
| 82 const SkBitmap* GetWebStoreImage(); | |
| 83 | |
| 84 // Returns the bitmap for the default app image. | 81 // Returns the bitmap for the default app image. |
| 85 const SkBitmap* GetDefaultAppImage(); | 82 const SkBitmap* GetDefaultAppImage(); |
| 86 | 83 |
| 87 // Returns the bitmap for the default extension. | 84 // Returns the bitmap for the default extension. |
| 88 const SkBitmap* GetDefaultExtensionImage(); | 85 const SkBitmap* GetDefaultExtensionImage(); |
| 89 | 86 |
| 90 // Performs any remaining transformations (like desaturating the |image|), | 87 // Performs any remaining transformations (like desaturating the |image|), |
| 91 // then returns the |image| to the client and clears up any temporary data | 88 // then returns the |image| to the client and clears up any temporary data |
| 92 // associated with the |request_id|. | 89 // associated with the |request_id|. |
| 93 void FinalizeImage(const SkBitmap* image, int request_id); | 90 void FinalizeImage(const SkBitmap* image, int request_id); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 scoped_ptr<SkBitmap> default_app_data_; | 161 scoped_ptr<SkBitmap> default_app_data_; |
| 165 | 162 |
| 166 scoped_ptr<SkBitmap> default_extension_data_; | 163 scoped_ptr<SkBitmap> default_extension_data_; |
| 167 | 164 |
| 168 CancelableRequestConsumerT<int, 0> cancelable_consumer_; | 165 CancelableRequestConsumerT<int, 0> cancelable_consumer_; |
| 169 | 166 |
| 170 DISALLOW_COPY_AND_ASSIGN(ExtensionIconSource); | 167 DISALLOW_COPY_AND_ASSIGN(ExtensionIconSource); |
| 171 }; | 168 }; |
| 172 | 169 |
| 173 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ | 170 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ |
| OLD | NEW |