OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSION_ICON_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSION_ICON_SOURCE_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_EXTENSION_ICON_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSION_ICON_SOURCE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // Loads the extension's |icon| for the given |request_id| and returns the | 93 // Loads the extension's |icon| for the given |request_id| and returns the |
94 // image to the client. | 94 // image to the client. |
95 void LoadExtensionImage(ExtensionResource icon, int request_id); | 95 void LoadExtensionImage(ExtensionResource icon, int request_id); |
96 | 96 |
97 // Loads the favicon image for the app associated with the |request_id|. If | 97 // Loads the favicon image for the app associated with the |request_id|. If |
98 // the image does not exist, we fall back to the default image. | 98 // the image does not exist, we fall back to the default image. |
99 void LoadFaviconImage(int request_id); | 99 void LoadFaviconImage(int request_id); |
100 | 100 |
101 // FaviconService callback | 101 // FaviconService callback |
102 void OnFaviconDataAvailable(FaviconService::Handle request_handle, | 102 void OnFaviconDataAvailable(FaviconService::Handle request_handle, |
103 bool know_favicon, | 103 FaviconService::FaviconData favicon); |
104 scoped_refptr<RefCountedMemory> data, | |
105 bool expired, | |
106 GURL icon_url); | |
107 | 104 |
108 // ImageLoadingTracker::Observer | 105 // ImageLoadingTracker::Observer |
109 virtual void OnImageLoaded(SkBitmap* image, | 106 virtual void OnImageLoaded(SkBitmap* image, |
110 ExtensionResource resource, | 107 ExtensionResource resource, |
111 int id); | 108 int id); |
112 | 109 |
113 // Parses and savse an ExtensionIconRequest for the URL |path| for the | 110 // Parses and savse an ExtensionIconRequest for the URL |path| for the |
114 // specified |request_id|. | 111 // specified |request_id|. |
115 bool ParseData(const std::string& path, int request_id); | 112 bool ParseData(const std::string& path, int request_id); |
116 | 113 |
(...skipping 29 matching lines...) Expand all Loading... |
146 scoped_ptr<SkBitmap> default_app_data_; | 143 scoped_ptr<SkBitmap> default_app_data_; |
147 | 144 |
148 scoped_ptr<SkBitmap> default_extension_data_; | 145 scoped_ptr<SkBitmap> default_extension_data_; |
149 | 146 |
150 CancelableRequestConsumerT<int, 0> cancelable_consumer_; | 147 CancelableRequestConsumerT<int, 0> cancelable_consumer_; |
151 | 148 |
152 DISALLOW_COPY_AND_ASSIGN(ExtensionIconSource); | 149 DISALLOW_COPY_AND_ASSIGN(ExtensionIconSource); |
153 }; | 150 }; |
154 | 151 |
155 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSION_ICON_SOURCE_H_ | 152 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSION_ICON_SOURCE_H_ |
OLD | NEW |