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

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: New dependence 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
« no previous file with comments | « chrome/browser/ui/views/location_bar/selected_keyword_view.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 "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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 398
399 ImageSkia CreateVectorIcon(VectorIconId id, size_t dip_size, SkColor color) { 399 ImageSkia CreateVectorIcon(VectorIconId id, size_t dip_size, SkColor color) {
400 return CreateVectorIconWithBadge(id, dip_size, color, 400 return CreateVectorIconWithBadge(id, dip_size, color,
401 VectorIconId::VECTOR_ICON_NONE); 401 VectorIconId::VECTOR_ICON_NONE);
402 } 402 }
403 403
404 ImageSkia CreateVectorIconWithBadge(VectorIconId id, 404 ImageSkia CreateVectorIconWithBadge(VectorIconId id,
405 size_t dip_size, 405 size_t dip_size,
406 SkColor color, 406 SkColor color,
407 VectorIconId badge_id) { 407 VectorIconId badge_id) {
408 return g_icon_cache.Get().GetOrCreateIcon(id, dip_size, color, badge_id); 408 return (id == VectorIconId::VECTOR_ICON_NONE)
Evan Stade 2016/03/30 21:44:13 After thinking about this more, the thing that wor
Peter Kasting 2016/03/30 21:53:23 Why do you say most containers will ignore Preferr
409 ? gfx::ImageSkia()
410 : g_icon_cache.Get().GetOrCreateIcon(id, dip_size, color,
411 badge_id);
409 } 412 }
410 413
411 ImageSkia CreateVectorIconFromSource(const std::string& source, 414 ImageSkia CreateVectorIconFromSource(const std::string& source,
412 size_t dip_size, 415 size_t dip_size,
413 SkColor color) { 416 SkColor color) {
414 return ImageSkia( 417 return ImageSkia(
415 new VectorIconSource(source, dip_size, color), 418 new VectorIconSource(source, dip_size, color),
416 gfx::Size(static_cast<int>(dip_size), static_cast<int>(dip_size))); 419 gfx::Size(static_cast<int>(dip_size), static_cast<int>(dip_size)));
417 } 420 }
418 421
419 } // namespace gfx 422 } // namespace gfx
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/selected_keyword_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698