| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/favicon_base/fallback_icon_service.h" | 5 #include "components/favicon_base/fallback_icon_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "components/favicon_base/fallback_icon_style.h" | 11 #include "components/favicon_base/fallback_icon_style.h" |
| 12 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 12 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 13 #include "third_party/skia/include/core/SkPaint.h" | 13 #include "third_party/skia/include/core/SkPaint.h" |
| 14 #include "ui/base/l10n/l10n_util.h" | |
| 15 #include "ui/gfx/canvas.h" | 14 #include "ui/gfx/canvas.h" |
| 16 #include "ui/gfx/codec/png_codec.h" | 15 #include "ui/gfx/codec/png_codec.h" |
| 17 #include "ui/gfx/font_list.h" | 16 #include "ui/gfx/font_list.h" |
| 18 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
| 19 #include "ui/gfx/geometry/size.h" | 18 #include "ui/gfx/geometry/size.h" |
| 20 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 21 | 20 |
| 22 namespace favicon_base { | 21 namespace favicon_base { |
| 23 | 22 |
| 24 namespace { | 23 namespace { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // TODO(huangs): See how expensive gfx::FontList() is, and possibly cache. | 88 // TODO(huangs): See how expensive gfx::FontList() is, and possibly cache. |
| 90 canvas->DrawStringRectWithFlags( | 89 canvas->DrawStringRectWithFlags( |
| 91 icon_text, | 90 icon_text, |
| 92 gfx::FontList(font_list_, gfx::Font::NORMAL, font_size), | 91 gfx::FontList(font_list_, gfx::Font::NORMAL, font_size), |
| 93 style.text_color, | 92 style.text_color, |
| 94 gfx::Rect(kOffsetX, kOffsetY, size, size), | 93 gfx::Rect(kOffsetX, kOffsetY, size, size), |
| 95 gfx::Canvas::TEXT_ALIGN_CENTER); | 94 gfx::Canvas::TEXT_ALIGN_CENTER); |
| 96 } | 95 } |
| 97 | 96 |
| 98 } // namespace favicon_base | 97 } // namespace favicon_base |
| OLD | NEW |