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

Unified Diff: ui/gfx/native_theme_base.cc

Issue 9151011: Revert 116894 - Factor more colors into NativeTheme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/native_theme_base.h ('k') | ui/gfx/native_theme_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/native_theme_base.cc
===================================================================
--- ui/gfx/native_theme_base.cc (revision 116905)
+++ ui/gfx/native_theme_base.cc (working copy)
@@ -16,6 +16,12 @@
namespace {
+// Hardcoded colors for use when there is no system theme (Aura, ChromeOS).
+const SkColor kDefaultDialogBackgroundColor = SkColorSetRGB(200, 200, 200);
+const SkColor kDefaultFocusedBorderColor= SkColorSetRGB(0x4D, 0x90, 0xFE);
+const SkColor kDefaultUnfocusedBorderColor = SkColorSetRGB(0xD9, 0xD9, 0xD9);
+const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128);
+
// These are the default dimensions of radio buttons and checkboxes.
const int kCheckboxAndRadioWidth = 13;
const int kCheckboxAndRadioHeight = 13;
@@ -202,6 +208,23 @@
}
}
+SkColor NativeThemeBase::GetSystemColor(ColorId color_id) const {
+ // This implementation returns hardcoded colors. It's used by NativeThemeAura
+ // and NativeThemeChromeos and overridden by NativeThemeGtk.
+ switch (color_id) {
+ case kColorId_DialogBackground:
+ return kDefaultDialogBackgroundColor;
+ case kColorId_FocusedBorderColor:
+ return kDefaultFocusedBorderColor;
+ case kColorId_UnfocusedBorderColor:
+ return kDefaultUnfocusedBorderColor;
+ default:
+ NOTREACHED() << "Invalid color_id: " << color_id;
+ break;
+ }
+ return kInvalidColorIdColor;
+}
+
NativeThemeBase::NativeThemeBase() {
}
« no previous file with comments | « ui/gfx/native_theme_base.h ('k') | ui/gfx/native_theme_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698