Chromium Code Reviews| Index: chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm |
| diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm |
| index c21981d1a83148c414ad13483af997296d8d6fac..5a55ab1e653cd2c4249c5b36f270232fd266ae4d 100644 |
| --- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm |
| +++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm |
| @@ -16,6 +16,7 @@ |
| #include "third_party/skia/include/core/SkColor.h" |
| #include "ui/base/cocoa/window_size_constants.h" |
| #include "ui/base/resource/resource_bundle.h" |
| +#include "ui/gfx/color_palette.h" |
|
Robert Sesek
2016/12/14 20:14:21
Unused include?
|
| #include "ui/gfx/font_list.h" |
| #include "ui/gfx/geometry/point.h" |
| #include "ui/gfx/geometry/rect.h" |
| @@ -197,11 +198,8 @@ - (CGFloat)drawName:(NSString*)name |
| rightAlign:(BOOL)rightAlign |
| bounds:(NSRect)bounds |
| textYOffset:(CGFloat)textYOffset { |
| - // TODO(crbug.com/666189): Use |
| - // AutofillPopupLayoutModel::GetValueFontColorForRow() instead and remove |
| - // IsWarning() method. |
| - NSColor* nameColor = |
| - controller_->IsWarning(index) ? [self warningColor] : [self nameColor]; |
| + SkColor skColor = controller_->layout_model().GetValueFontColorForRow(index); |
| + NSColor* nameColor = skia::SkColorToSRGBNSColor(skColor); |
|
Robert Sesek
2016/12/14 20:14:21
Since skColor is only used here you could just do:
|
| NSDictionary* nameAttributes = [NSDictionary |
| dictionaryWithObjectsAndKeys:controller_->layout_model() |
| .GetValueFontListForRow(index) |