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

Side by Side Diff: chrome/browser/ui/webui/favicon_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_FAVICON_SOURCE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_
6 #define CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 protected: 48 protected:
49 virtual ~FaviconSource(); 49 virtual ~FaviconSource();
50 50
51 Profile* profile_; 51 Profile* profile_;
52 52
53 private: 53 private:
54 void Init(Profile* profile, IconType type); 54 void Init(Profile* profile, IconType type);
55 55
56 // Called when favicon data is available from the history backend. 56 // Called when favicon data is available from the history backend.
57 void OnFaviconDataAvailable(FaviconService::Handle request_handle, 57 void OnFaviconDataAvailable(
58 history::FaviconData favicon); 58 FaviconService::Handle request_handle,
59 const history::FaviconBitmapResult& bitmap_result);
59 60
60 // Sends the default favicon. 61 // Sends the default favicon.
61 void SendDefaultResponse(int request_id); 62 void SendDefaultResponse(int request_id);
62 63
63 CancelableRequestConsumerT<int, 0> cancelable_consumer_; 64 CancelableRequestConsumerT<int, 0> cancelable_consumer_;
64 65
65 // Map from request ID to size requested (in pixels). TODO(estade): Get rid of 66 // Map from request ID to size requested (in pixels). TODO(estade): Get rid of
66 // this map when we properly support multiple favicon sizes. 67 // this map when we properly support multiple favicon sizes.
67 std::map<int, int> request_size_map_; 68 std::map<int, int> request_size_map_;
68 69
69 // Raw PNG representation of the favicon to show when the favicon 70 // Raw PNG representation of the favicon to show when the favicon
70 // database doesn't have a favicon for a webpage. 71 // database doesn't have a favicon for a webpage.
71 // 16x16 72 // 16x16
72 scoped_refptr<base::RefCountedMemory> default_favicon_; 73 scoped_refptr<base::RefCountedMemory> default_favicon_;
73 // 32x32 74 // 32x32
74 scoped_refptr<base::RefCountedMemory> default_favicon_large_; 75 scoped_refptr<base::RefCountedMemory> default_favicon_large_;
75 76
76 // The history::IconTypes of icon that this FaviconSource handles. 77 // The history::IconTypes of icon that this FaviconSource handles.
77 int icon_types_; 78 int icon_types_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(FaviconSource); 80 DISALLOW_COPY_AND_ASSIGN(FaviconSource);
80 }; 81 };
81 82
82 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ 83 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698