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_NATIVE_THEME_NATIVE_THEME_H_ | 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_H_ |
6 #define UI_NATIVE_THEME_NATIVE_THEME_H_ | 6 #define UI_NATIVE_THEME_NATIVE_THEME_H_ |
7 | 7 |
8 #include "third_party/skia/include/core/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 #include "ui/native_theme/native_theme_export.h" | 10 #include "ui/native_theme/native_theme_export.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 kColorId_TreeSelectionBackgroundUnfocused, | 274 kColorId_TreeSelectionBackgroundUnfocused, |
275 kColorId_TreeArrow, | 275 kColorId_TreeArrow, |
276 // Table | 276 // Table |
277 kColorId_TableBackground, | 277 kColorId_TableBackground, |
278 kColorId_TableText, | 278 kColorId_TableText, |
279 kColorId_TableSelectedText, | 279 kColorId_TableSelectedText, |
280 kColorId_TableSelectedTextUnfocused, | 280 kColorId_TableSelectedTextUnfocused, |
281 kColorId_TableSelectionBackgroundFocused, | 281 kColorId_TableSelectionBackgroundFocused, |
282 kColorId_TableSelectionBackgroundUnfocused, | 282 kColorId_TableSelectionBackgroundUnfocused, |
283 kColorId_TableGroupingIndicatorColor, | 283 kColorId_TableGroupingIndicatorColor, |
284 // Results Tables, such as the chrome omnibox. | |
msw
2014/04/03 18:53:53
I think it would be beneficial to merge these colo
Elliot Glaysher
2014/04/03 20:25:27
This feels like a different control type. The omni
sky
2014/04/03 21:37:40
I tend to favor explicit values, like Elliot has,
| |
285 kColorId_ResultsTableNormalBackground, | |
286 kColorId_ResultsTableHoveredBackground, | |
287 kColorId_ResultsTableSelectedBackground, | |
288 kColorId_ResultsTableNormalText, | |
289 kColorId_ResultsTableHoveredText, | |
290 kColorId_ResultsTableSelectedText, | |
291 kColorId_ResultsTableNormalDimmedText, | |
292 kColorId_ResultsTableHoveredDimmedText, | |
293 kColorId_ResultsTableSelectedDimmedText, | |
294 kColorId_ResultsTableNormalUrl, | |
295 kColorId_ResultsTableHoveredUrl, | |
296 kColorId_ResultsTableSelectedUrl, | |
297 kColorId_ResultsTableNormalDivider, | |
298 kColorId_ResultsTableHoveredDivider, | |
299 kColorId_ResultsTableSelectedDivider, | |
284 // TODO(benrg): move other hardcoded colors here. | 300 // TODO(benrg): move other hardcoded colors here. |
285 }; | 301 }; |
286 | 302 |
287 // Return a color from the system theme. | 303 // Return a color from the system theme. |
288 virtual SkColor GetSystemColor(ColorId color_id) const = 0; | 304 virtual SkColor GetSystemColor(ColorId color_id) const = 0; |
289 | 305 |
290 // Returns a shared instance of the native theme. | 306 // Returns a shared instance of the native theme. |
291 // The returned object should not be deleted by the caller. This function | 307 // The returned object should not be deleted by the caller. This function |
292 // is not thread safe and should only be called from the UI thread. | 308 // is not thread safe and should only be called from the UI thread. |
293 // Each port of NativeTheme should provide its own implementation of this | 309 // Each port of NativeTheme should provide its own implementation of this |
294 // function, returning the port's subclass. | 310 // function, returning the port's subclass. |
295 static NativeTheme* instance(); | 311 static NativeTheme* instance(); |
296 | 312 |
297 protected: | 313 protected: |
298 NativeTheme(); | 314 NativeTheme(); |
299 virtual ~NativeTheme(); | 315 virtual ~NativeTheme(); |
300 | 316 |
301 unsigned int thumb_inactive_color_; | 317 unsigned int thumb_inactive_color_; |
302 unsigned int thumb_active_color_; | 318 unsigned int thumb_active_color_; |
303 unsigned int track_color_; | 319 unsigned int track_color_; |
304 | 320 |
305 DISALLOW_COPY_AND_ASSIGN(NativeTheme); | 321 DISALLOW_COPY_AND_ASSIGN(NativeTheme); |
306 }; | 322 }; |
307 | 323 |
308 } // namespace ui | 324 } // namespace ui |
309 | 325 |
310 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ | 326 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ |
OLD | NEW |