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

Side by Side 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: [En|Dis]able the RenderText cursor instead of setting transient visibility. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 kColorId_MenuSeparatorColor, 236 kColorId_MenuSeparatorColor,
237 kColorId_MenuBackgroundColor, 237 kColorId_MenuBackgroundColor,
238 kColorId_MenuBorderColor, 238 kColorId_MenuBorderColor,
239 // Label 239 // Label
240 kColorId_LabelEnabledColor, 240 kColorId_LabelEnabledColor,
241 kColorId_LabelDisabledColor, 241 kColorId_LabelDisabledColor,
242 kColorId_LabelBackgroundColor, 242 kColorId_LabelBackgroundColor,
243 // Textfield 243 // Textfield
244 kColorId_TextfieldDefaultColor, 244 kColorId_TextfieldDefaultColor,
245 kColorId_TextfieldDefaultBackground, 245 kColorId_TextfieldDefaultBackground,
246 kColorId_TextfieldReadOnlyColor,
247 kColorId_TextfieldReadOnlyBackground,
246 kColorId_TextfieldSelectionColor, 248 kColorId_TextfieldSelectionColor,
247 kColorId_TextfieldSelectionBackgroundFocused, 249 kColorId_TextfieldSelectionBackgroundFocused,
248 kColorId_TextfieldSelectionBackgroundUnfocused, 250 kColorId_TextfieldSelectionBackgroundUnfocused,
249 // TODO(benrg): move other hardcoded colors here. 251 // TODO(benrg): move other hardcoded colors here.
250 }; 252 };
251 253
252 // Return a color from the system theme. 254 // Return a color from the system theme.
253 virtual SkColor GetSystemColor(ColorId color_id) const = 0; 255 virtual SkColor GetSystemColor(ColorId color_id) const = 0;
254 256
255 // Returns a shared instance of the native theme. 257 // Returns a shared instance of the native theme.
256 // The returned object should not be deleted by the caller. This function 258 // The returned object should not be deleted by the caller. This function
257 // is not thread safe and should only be called from the UI thread. 259 // is not thread safe and should only be called from the UI thread.
258 // Each port of NativeTheme should provide its own implementation of this 260 // Each port of NativeTheme should provide its own implementation of this
259 // function, returning the port's subclass. 261 // function, returning the port's subclass.
260 static NativeTheme* instance(); 262 static NativeTheme* instance();
261 263
262 static bool IsNewMenuStyleEnabled(); 264 static bool IsNewMenuStyleEnabled();
263 265
264 protected: 266 protected:
265 NativeTheme(); 267 NativeTheme();
266 virtual ~NativeTheme() {} 268 virtual ~NativeTheme();
267 269
268 unsigned int thumb_inactive_color_; 270 unsigned int thumb_inactive_color_;
269 unsigned int thumb_active_color_; 271 unsigned int thumb_active_color_;
270 unsigned int track_color_; 272 unsigned int track_color_;
271 273
272 DISALLOW_COPY_AND_ASSIGN(NativeTheme); 274 DISALLOW_COPY_AND_ASSIGN(NativeTheme);
273 }; 275 };
274 276
275 } // namespace ui 277 } // namespace ui
276 278
277 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ 279 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698