Chromium Code Reviews| Index: ui/gfx/native_theme.h |
| diff --git a/ui/gfx/native_theme.h b/ui/gfx/native_theme.h |
| index cc9aa35e4049bcdb8eabadaa4158b330415a96f0..f561e30d9093dd1576a29e5dff148aae2ce64fff 100644 |
| --- a/ui/gfx/native_theme.h |
| +++ b/ui/gfx/native_theme.h |
| @@ -19,11 +19,13 @@ class Size; |
| // This class supports drawing UI controls (like buttons, text fields, lists, |
| // comboboxes, etc) that look like the native UI controls of the underlying |
| -// platform, such as Windows or Linux. |
| +// platform, such as Windows or Linux. It also supplies default colors for |
| +// dialog box backgrounds, etc., which are obtained from the system theme where |
| +// possible. |
| // |
| // The supported control types are listed in the Part enum. These parts can be |
| -// in any state given by the State enum, where the actual definititon of the |
| -// state is part-specific. |
| +// in any state given by the State enum, where the actual definition of the |
| +// state is part-specific. The supported colors are listed in the ColorId enum. |
| // |
| // Some parts require more information than simply the state in order to be |
| // drawn correctly, and this information is given to the Paint() method via the |
| @@ -212,6 +214,15 @@ class UI_EXPORT NativeTheme { |
| unsigned active_color, |
| unsigned track_color) const; |
| + // Colors for GetSystemColor(). |
| + enum ColorId { |
| + kDialogBackgroundColorId |
|
Ben Goodger (Google)
2011/11/21 18:59:59
OCD requires me to suggest putting the constant pa
benrg
2011/11/21 19:54:20
Done.
|
| + // TODO(benrg): move other hardcoded colors here. |
| + }; |
| + |
| + // Return a color from the system theme. |
| + virtual SkColor GetSystemColor(ColorId color_id) const = 0; |
| + |
| // Returns a shared instance of the native theme. |
| // The returned object should not be deleted by the caller. This function |
| // is not thread safe and should only be called from the UI thread. |