Index: components/favicon_base/fallback_icon_service.cc |
diff --git a/components/favicon_base/fallback_icon_service.cc b/components/favicon_base/fallback_icon_service.cc |
index adce72e105f6a1fce671c62fb27dabcecfb0ef87..89df7642c6389394d66a878dbecd864e6f69f13a 100644 |
--- a/components/favicon_base/fallback_icon_service.cc |
+++ b/components/favicon_base/fallback_icon_service.cc |
@@ -8,6 +8,7 @@ |
#include "base/i18n/case_conversion.h" |
#include "base/strings/utf_string_conversions.h" |
+#include "components/favicon/core/browser/fallback_icon_client.h" |
sdefresne
2015/03/17 09:41:52
favicon_base component must not depends on favicon
huangs
2015/03/23 03:28:35
Moved to components/favicon/core to join siblings
|
#include "components/favicon_base/fallback_icon_style.h" |
#include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
#include "third_party/skia/include/core/SkPaint.h" |
@@ -38,8 +39,8 @@ base::string16 GetFallbackIconText(const GURL& url) { |
} // namespace |
FallbackIconService::FallbackIconService( |
- const std::vector<std::string>& font_list) |
- : font_list_(font_list) { |
+ FallbackIconClient* fallback_icon_client) |
+ : fallback_icon_client_(fallback_icon_client) { |
} |
FallbackIconService::~FallbackIconService() { |
@@ -88,7 +89,8 @@ void FallbackIconService::DrawFallbackIcon(const GURL& icon_url, |
// TODO(huangs): See how expensive gfx::FontList() is, and possibly cache. |
canvas->DrawStringRectWithFlags( |
icon_text, |
- gfx::FontList(font_list_, gfx::Font::NORMAL, font_size), |
+ gfx::FontList(fallback_icon_client_->GetFontNameList(), gfx::Font::NORMAL, |
+ font_size), |
style.text_color, |
gfx::Rect(kOffsetX, kOffsetY, size, size), |
gfx::Canvas::TEXT_ALIGN_CENTER); |