Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_icon_source.h

Issue 10870022: Change FaviconData to be able to return data for multiple bitmaps for same icon URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 // Loads the extension's |icon| for the given |request_id| and returns the 102 // Loads the extension's |icon| for the given |request_id| and returns the
103 // image to the client. 103 // image to the client.
104 void LoadExtensionImage(const ExtensionResource& icon, int request_id); 104 void LoadExtensionImage(const ExtensionResource& icon, int request_id);
105 105
106 // Loads the favicon image for the app associated with the |request_id|. If 106 // Loads the favicon image for the app associated with the |request_id|. If
107 // the image does not exist, we fall back to the default image. 107 // the image does not exist, we fall back to the default image.
108 void LoadFaviconImage(int request_id); 108 void LoadFaviconImage(int request_id);
109 109
110 // FaviconService callback 110 // FaviconService callback
111 void OnFaviconDataAvailable(FaviconService::Handle request_handle, 111 void OnFaviconDataAvailable(
112 history::FaviconData favicon); 112 FaviconService::Handle request_handle,
113 const history::FaviconBitmapResult& bitmap_result);
113 114
114 // ImageLoadingTracker::Observer 115 // ImageLoadingTracker::Observer
115 virtual void OnImageLoaded(const gfx::Image& image, 116 virtual void OnImageLoaded(const gfx::Image& image,
116 const std::string& extension_id, 117 const std::string& extension_id,
117 int id) OVERRIDE; 118 int id) OVERRIDE;
118 119
119 // Called when the extension doesn't have an icon. We fall back to multiple 120 // Called when the extension doesn't have an icon. We fall back to multiple
120 // sources, using the following order: 121 // sources, using the following order:
121 // 1) The icons as listed in the extension / app manifests. 122 // 1) The icons as listed in the extension / app manifests.
122 // 2) If a 16px icon and the extension has a launch URL, see if Chrome 123 // 2) If a 16px icon and the extension has a launch URL, see if Chrome
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 scoped_ptr<SkBitmap> default_app_data_; 163 scoped_ptr<SkBitmap> default_app_data_;
163 164
164 scoped_ptr<SkBitmap> default_extension_data_; 165 scoped_ptr<SkBitmap> default_extension_data_;
165 166
166 CancelableRequestConsumerT<int, 0> cancelable_consumer_; 167 CancelableRequestConsumerT<int, 0> cancelable_consumer_;
167 168
168 DISALLOW_COPY_AND_ASSIGN(ExtensionIconSource); 169 DISALLOW_COPY_AND_ASSIGN(ExtensionIconSource);
169 }; 170 };
170 171
171 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ 172 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698