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

Side by Side Diff: ui/gfx/paint_vector_icon.cc

Issue 1829353002: Fix padding in location bar bubbles to match specs on bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hide_background_later
Patch Set: Rebase Created 4 years, 8 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
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 "ui/gfx/paint_vector_icon.h" 5 #include "ui/gfx/paint_vector_icon.h"
6 6
7 #include <map> 7 #include <map>
8 #include <tuple> 8 #include <tuple>
9 9
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 ImageSkia CreateVectorIcon(VectorIconId id, size_t dip_size, SkColor color) { 395 ImageSkia CreateVectorIcon(VectorIconId id, size_t dip_size, SkColor color) {
396 return CreateVectorIconWithBadge(id, dip_size, color, 396 return CreateVectorIconWithBadge(id, dip_size, color,
397 VectorIconId::VECTOR_ICON_NONE); 397 VectorIconId::VECTOR_ICON_NONE);
398 } 398 }
399 399
400 ImageSkia CreateVectorIconWithBadge(VectorIconId id, 400 ImageSkia CreateVectorIconWithBadge(VectorIconId id,
401 size_t dip_size, 401 size_t dip_size,
402 SkColor color, 402 SkColor color,
403 VectorIconId badge_id) { 403 VectorIconId badge_id) {
404 return g_icon_cache.Get().GetOrCreateIcon(id, dip_size, color, badge_id); 404 return (id == VectorIconId::VECTOR_ICON_NONE)
405 ? gfx::ImageSkia()
406 : g_icon_cache.Get().GetOrCreateIcon(id, dip_size, color,
407 badge_id);
405 } 408 }
406 409
407 ImageSkia CreateVectorIconFromSource(const std::string& source, 410 ImageSkia CreateVectorIconFromSource(const std::string& source,
408 size_t dip_size, 411 size_t dip_size,
409 SkColor color) { 412 SkColor color) {
410 return ImageSkia( 413 return ImageSkia(
411 new VectorIconSource(source, dip_size, color), 414 new VectorIconSource(source, dip_size, color),
412 gfx::Size(static_cast<int>(dip_size), static_cast<int>(dip_size))); 415 gfx::Size(static_cast<int>(dip_size), static_cast<int>(dip_size)));
413 } 416 }
414 417
415 } // namespace gfx 418 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698