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 #include "chrome/browser/ui/webui/favicon_source.h" | 5 #include "chrome/browser/ui/webui/favicon_source.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "chrome/browser/history/top_sites.h" | 9 #include "chrome/browser/history/top_sites.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
12 #include "grit/locale_settings.h" | 12 #include "grit/locale_settings.h" |
13 #include "grit/ui_resources.h" | 13 #include "grit/ui_resources.h" |
| 14 #include "grit/ui_resources_standard.h" |
14 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
15 #include "ui/base/layout.h" | 16 #include "ui/base/layout.h" |
16 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
17 | 18 |
18 FaviconSource::FaviconSource(Profile* profile, IconType type) | 19 FaviconSource::FaviconSource(Profile* profile, IconType type) |
19 : DataSource(type == FAVICON ? chrome::kChromeUIFaviconHost : | 20 : DataSource(type == FAVICON ? chrome::kChromeUIFaviconHost : |
20 chrome::kChromeUITouchIconHost, | 21 chrome::kChromeUITouchIconHost, |
21 MessageLoop::current()) { | 22 MessageLoop::current()) { |
22 Init(profile, type); | 23 Init(profile, type); |
23 } | 24 } |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 default_favicon_ = | 159 default_favicon_ = |
159 ResourceBundle::GetSharedInstance().LoadDataResourceBytes( | 160 ResourceBundle::GetSharedInstance().LoadDataResourceBytes( |
160 IDR_DEFAULT_FAVICON, ui::SCALE_FACTOR_100P); | 161 IDR_DEFAULT_FAVICON, ui::SCALE_FACTOR_100P); |
161 } | 162 } |
162 bytes = default_favicon_; | 163 bytes = default_favicon_; |
163 } | 164 } |
164 request_size_map_.erase(request_id); | 165 request_size_map_.erase(request_id); |
165 | 166 |
166 SendResponse(request_id, bytes); | 167 SendResponse(request_id, bytes); |
167 } | 168 } |
OLD | NEW |