| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_GFX_NATIVE_THEME_H_ | 5 #ifndef UI_GFX_NATIVE_THEME_H_ |
| 6 #define UI_GFX_NATIVE_THEME_H_ | 6 #define UI_GFX_NATIVE_THEME_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
| 10 #include "ui/base/ui_export.h" | 10 #include "ui/base/ui_export.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 const gfx::Rect& rect, | 209 const gfx::Rect& rect, |
| 210 const ExtraParams& extra) const = 0; | 210 const ExtraParams& extra) const = 0; |
| 211 | 211 |
| 212 // Supports theme specific colors. | 212 // Supports theme specific colors. |
| 213 void SetScrollbarColors(unsigned inactive_color, | 213 void SetScrollbarColors(unsigned inactive_color, |
| 214 unsigned active_color, | 214 unsigned active_color, |
| 215 unsigned track_color) const; | 215 unsigned track_color) const; |
| 216 | 216 |
| 217 // Colors for GetSystemColor(). | 217 // Colors for GetSystemColor(). |
| 218 enum ColorId { | 218 enum ColorId { |
| 219 // Dialogs | |
| 220 kColorId_DialogBackground, | 219 kColorId_DialogBackground, |
| 221 // FocusableBorder | |
| 222 kColorId_FocusedBorderColor, | 220 kColorId_FocusedBorderColor, |
| 223 kColorId_UnfocusedBorderColor, | 221 kColorId_UnfocusedBorderColor |
| 224 // TextButton | |
| 225 kColorId_TextButtonBackgroundColor, | |
| 226 kColorId_TextButtonEnabledColor, | |
| 227 kColorId_TextButtonDisabledColor, | |
| 228 kColorId_TextButtonHighlightColor, | |
| 229 kColorId_TextButtonHoverColor, | |
| 230 // MenuItem | |
| 231 kColorId_EnabledMenuItemForegroundColor, | |
| 232 kColorId_DisabledMenuItemForegroundColor, | |
| 233 kColorId_FocusedMenuItemBackgroundColor | |
| 234 // TODO(benrg): move other hardcoded colors here. | 222 // TODO(benrg): move other hardcoded colors here. |
| 235 }; | 223 }; |
| 236 | 224 |
| 237 // Return a color from the system theme. | 225 // Return a color from the system theme. |
| 238 virtual SkColor GetSystemColor(ColorId color_id) const = 0; | 226 virtual SkColor GetSystemColor(ColorId color_id) const = 0; |
| 239 | 227 |
| 240 // Returns a shared instance of the native theme. | 228 // Returns a shared instance of the native theme. |
| 241 // The returned object should not be deleted by the caller. This function | 229 // The returned object should not be deleted by the caller. This function |
| 242 // is not thread safe and should only be called from the UI thread. | 230 // is not thread safe and should only be called from the UI thread. |
| 243 // Each port of NativeTheme should provide its own implementation of this | 231 // Each port of NativeTheme should provide its own implementation of this |
| 244 // function, returning the port's subclass. | 232 // function, returning the port's subclass. |
| 245 static const NativeTheme* instance(); | 233 static const NativeTheme* instance(); |
| 246 | 234 |
| 247 protected: | 235 protected: |
| 248 NativeTheme() {} | 236 NativeTheme() {} |
| 249 virtual ~NativeTheme() {} | 237 virtual ~NativeTheme() {} |
| 250 | 238 |
| 251 static unsigned int thumb_inactive_color_; | 239 static unsigned int thumb_inactive_color_; |
| 252 static unsigned int thumb_active_color_; | 240 static unsigned int thumb_active_color_; |
| 253 static unsigned int track_color_; | 241 static unsigned int track_color_; |
| 254 | 242 |
| 255 DISALLOW_COPY_AND_ASSIGN(NativeTheme); | 243 DISALLOW_COPY_AND_ASSIGN(NativeTheme); |
| 256 }; | 244 }; |
| 257 | 245 |
| 258 } // namespace gfx | 246 } // namespace gfx |
| 259 | 247 |
| 260 #endif // UI_GFX_NATIVE_THEME_H_ | 248 #endif // UI_GFX_NATIVE_THEME_H_ |
| OLD | NEW |