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

Unified Diff: chrome/browser/ui/autofill/popup_constants.h

Issue 2581513002: Replace hard-coded colors from ui::NativeTheme for consistency and accessibility. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/popup_constants.h
diff --git a/chrome/browser/ui/autofill/popup_constants.h b/chrome/browser/ui/autofill/popup_constants.h
index 30c1dfc7759425d8dfab5dd478a48e409ba69ded..cc7d5ddfd38e57cc7f2b2f73f4f4b3a33fbdb5d7 100644
--- a/chrome/browser/ui/autofill/popup_constants.h
+++ b/chrome/browser/ui/autofill/popup_constants.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_AUTOFILL_POPUP_CONSTANTS_H_
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/native_theme/native_theme.h"
namespace autofill {
@@ -13,11 +14,15 @@ namespace autofill {
const int kPopupBorderThickness = 1;
// Various colors used in the Autofill popup.
-// TODO(crbug.com/666523): These colors ought to be replaced by getting colors
-// from ui::NativeTheme for consistency and accessibility.
-const SkColor kBorderColor = SkColorSetRGB(0xC7, 0xCA, 0xCE);
-const SkColor kHoveredBackgroundColor = SkColorSetRGB(0xCD, 0xCD, 0xCD);
-const SkColor kLabelTextColor = SkColorSetRGB(0x64, 0x64, 0x64);
+const SkColor kBorderColor =
+ ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
+ ui::NativeTheme::kColorId_UnfocusedBorderColor);
+const SkColor kHoveredBackgroundColor =
+ ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
Evan Stade 2016/12/15 17:42:14 you shouldn't really be calling this here as it wo
jiahuiguo 2016/12/20 09:58:10 Done.
+ ui::NativeTheme::kColorId_ResultsTableHoveredBackground);
+const SkColor kLabelTextColor =
+ ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
+ ui::NativeTheme::kColorId_TextfieldReadOnlyColor);
Mathieu 2016/12/15 17:37:06 Should we use kColorId_ResultsTableNormalDimmedTex
jiahuiguo 2016/12/20 09:58:10 Done.
constexpr SkColor kPopupBackground = SK_ColorWHITE;
Mathieu 2016/12/15 17:37:06 Should we use kColorId_ResultsTableNormalBackgroun
jiahuiguo 2016/12/20 09:58:11 Done.
constexpr SkColor kValueTextColor = SK_ColorBLACK;
Mathieu 2016/12/15 17:37:06 Should we use kColorId_ResultsTableNormalText?
jiahuiguo 2016/12/20 09:58:11 Done.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698