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_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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 enum IconSize { | 113 enum IconSize { |
114 SIZE_16, | 114 SIZE_16, |
115 SIZE_32, | 115 SIZE_32, |
116 SIZE_64, | 116 SIZE_64, |
117 NUM_SIZES | 117 NUM_SIZES |
118 }; | 118 }; |
119 | 119 |
120 // Called when favicon data is available from the history backend. | 120 // Called when favicon data is available from the history backend. |
121 void OnFaviconDataAvailable( | 121 void OnFaviconDataAvailable( |
122 const IconRequest& request, | 122 const IconRequest& request, |
123 const favicon_base::FaviconBitmapResult& bitmap_result); | 123 const favicon_base::FaviconRawBitmapResult& bitmap_result); |
124 | 124 |
125 // Sends the 16x16 DIP 1x default favicon. | 125 // Sends the 16x16 DIP 1x default favicon. |
126 void SendDefaultResponse( | 126 void SendDefaultResponse( |
127 const content::URLDataSource::GotDataCallback& callback); | 127 const content::URLDataSource::GotDataCallback& callback); |
128 | 128 |
129 // Sends the default favicon. | 129 // Sends the default favicon. |
130 void SendDefaultResponse(const IconRequest& request); | 130 void SendDefaultResponse(const IconRequest& request); |
131 | 131 |
132 base::CancelableTaskTracker cancelable_task_tracker_; | 132 base::CancelableTaskTracker cancelable_task_tracker_; |
133 | 133 |
134 // Raw PNG representations of favicons of each size to show when the favicon | 134 // Raw PNG representations of favicons of each size to show when the favicon |
135 // database doesn't have a favicon for a webpage. Indexed by IconSize values. | 135 // database doesn't have a favicon for a webpage. Indexed by IconSize values. |
136 scoped_refptr<base::RefCountedMemory> default_favicons_[NUM_SIZES]; | 136 scoped_refptr<base::RefCountedMemory> default_favicons_[NUM_SIZES]; |
137 | 137 |
138 // The favicon_base::IconTypes of icon that this FaviconSource handles. | 138 // The favicon_base::IconTypes of icon that this FaviconSource handles. |
139 int icon_types_; | 139 int icon_types_; |
140 | 140 |
141 DISALLOW_COPY_AND_ASSIGN(FaviconSource); | 141 DISALLOW_COPY_AND_ASSIGN(FaviconSource); |
142 }; | 142 }; |
143 | 143 |
144 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ | 144 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ |
OLD | NEW |