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

Side by Side Diff: components/favicon_base/fallback_icon_service.cc

Issue 835903005: [Favicon] Add new fallback icon rendering flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Getting code to work again after merge. Created 5 years, 9 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
« no previous file with comments | « chrome/common/url_constants.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/common/url_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698