| 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 | 
| 219     kColorId_DialogBackground, | 220     kColorId_DialogBackground, | 
|  | 221     // FocusableBorder | 
| 220     kColorId_FocusedBorderColor, | 222     kColorId_FocusedBorderColor, | 
| 221     kColorId_UnfocusedBorderColor | 223     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 | 
| 222     // TODO(benrg): move other hardcoded colors here. | 234     // TODO(benrg): move other hardcoded colors here. | 
| 223   }; | 235   }; | 
| 224 | 236 | 
| 225   // Return a color from the system theme. | 237   // Return a color from the system theme. | 
| 226   virtual SkColor GetSystemColor(ColorId color_id) const = 0; | 238   virtual SkColor GetSystemColor(ColorId color_id) const = 0; | 
| 227 | 239 | 
| 228   // Returns a shared instance of the native theme. | 240   // Returns a shared instance of the native theme. | 
| 229   // The returned object should not be deleted by the caller.  This function | 241   // The returned object should not be deleted by the caller.  This function | 
| 230   // is not thread safe and should only be called from the UI thread. | 242   // is not thread safe and should only be called from the UI thread. | 
| 231   // Each port of NativeTheme should provide its own implementation of this | 243   // Each port of NativeTheme should provide its own implementation of this | 
| 232   // function, returning the port's subclass. | 244   // function, returning the port's subclass. | 
| 233   static const NativeTheme* instance(); | 245   static const NativeTheme* instance(); | 
| 234 | 246 | 
| 235  protected: | 247  protected: | 
| 236   NativeTheme() {} | 248   NativeTheme() {} | 
| 237   virtual ~NativeTheme() {} | 249   virtual ~NativeTheme() {} | 
| 238 | 250 | 
| 239   static unsigned int thumb_inactive_color_; | 251   static unsigned int thumb_inactive_color_; | 
| 240   static unsigned int thumb_active_color_; | 252   static unsigned int thumb_active_color_; | 
| 241   static unsigned int track_color_; | 253   static unsigned int track_color_; | 
| 242 | 254 | 
| 243   DISALLOW_COPY_AND_ASSIGN(NativeTheme); | 255   DISALLOW_COPY_AND_ASSIGN(NativeTheme); | 
| 244 }; | 256 }; | 
| 245 | 257 | 
| 246 }  // namespace gfx | 258 }  // namespace gfx | 
| 247 | 259 | 
| 248 #endif  // UI_GFX_NATIVE_THEME_H_ | 260 #endif  // UI_GFX_NATIVE_THEME_H_ | 
| OLD | NEW | 
|---|