Index: ui/gfx/native_theme_base.cc |
diff --git a/ui/gfx/native_theme_base.cc b/ui/gfx/native_theme_base.cc |
index 95ba5aa1e681b1856e4f246b1c6837bab2157c68..c4ea57625f61d7aa580f277af72e500bf778aa4d 100644 |
--- a/ui/gfx/native_theme_base.cc |
+++ b/ui/gfx/native_theme_base.cc |
@@ -16,6 +16,12 @@ |
namespace gfx { |
+namespace { |
+// Hardcoded colors for use when there is no system theme (Aura, ChromeOS). |
+const SkColor kDefaultDialogBackgroundColor = SkColorSetRGB(200, 200, 200); |
+const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128); |
James Cook
2011/11/19 03:02:46
I like this name better.
|
+} |
James Cook
2011/11/19 03:02:46
The style guide likes namespaces to end with two s
benrg
2011/11/21 18:32:40
Done.
|
+ |
unsigned int NativeThemeBase::button_length_ = 14; |
#if defined(TOUCH_UI) |
unsigned int NativeThemeBase::scrollbar_width_ = 0; |
@@ -57,6 +63,19 @@ NativeThemeBase::NativeThemeBase() { |
NativeThemeBase::~NativeThemeBase() { |
} |
+// This implementation returns hardcoded colors. It's used by NativeThemeAura |
+// and NativeThemeChromeos and overridden by NativeThemeGtk. |
+SkColor NativeThemeBase::GetSystemColor(ColorId color_id) const { |
+ switch (color_id) { |
+ case kDialogBackgroundColorId: |
+ return kDefaultDialogBackgroundColor; |
+ default: |
+ NOTREACHED() << "Invalid color_id: " << color_id; |
+ break; |
+ } |
+ return kInvalidColorIdColor; |
+} |
+ |
gfx::Size NativeThemeBase::GetPartSize(Part part, |
State state, |
const ExtraParams& extra) const { |