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

Unified Diff: ui/native_theme/native_theme.h

Issue 11421204: Use native theme colors for textfields; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nix cursor color; adjust textfield functions; add read-only theme colors. Created 8 years 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
Index: ui/native_theme/native_theme.h
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index ed3ed35f50526370dac5306cab0018a1202e06be..a0955801f0248c8fbc73d7527c2e1d9ad1bf408f 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -5,8 +5,10 @@
#ifndef UI_NATIVE_THEME_NATIVE_THEME_H_
#define UI_NATIVE_THEME_NATIVE_THEME_H_
+#include "base/compiler_specific.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/sys_color_change_listener.h"
#include "ui/native_theme/native_theme_export.h"
class SkCanvas;
@@ -35,7 +37,7 @@ namespace ui {
//
// NativeTheme also supports getting the default size of a given part with
// the GetPartSize() method.
-class NATIVE_THEME_EXPORT NativeTheme {
+class NATIVE_THEME_EXPORT NativeTheme : public gfx::SysColorChangeListener {
sky 2012/12/04 22:38:14 Since only windows actually implement OnSysColorCh
msw 2012/12/05 02:09:56 Done.
public:
// The part to be painted / sized.
enum Part {
@@ -243,6 +245,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
// Textfield
kColorId_TextfieldDefaultColor,
kColorId_TextfieldDefaultBackground,
+ kColorId_TextfieldReadOnlyColor,
+ kColorId_TextfieldReadOnlyBackground,
kColorId_TextfieldSelectionColor,
kColorId_TextfieldSelectionBackgroundFocused,
kColorId_TextfieldSelectionBackgroundUnfocused,
@@ -263,7 +267,12 @@ class NATIVE_THEME_EXPORT NativeTheme {
protected:
NativeTheme();
- virtual ~NativeTheme() {}
+ virtual ~NativeTheme();
+
+ // gfx::SysColorChangeListener implementation:
+ virtual void OnSysColorChange() OVERRIDE;
+
+ gfx::ScopedSysColorChangeListener color_change_listener_;
unsigned int thumb_inactive_color_;
unsigned int thumb_active_color_;

Powered by Google App Engine
This is Rietveld 408576698