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 "base/observer_list.h" | 8 #include "base/observer_list.h" |
9 #include "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 State state, | 216 State state, |
217 const ExtraParams& extra) const = 0; | 217 const ExtraParams& extra) const = 0; |
218 | 218 |
219 // Paint the part to the canvas. | 219 // Paint the part to the canvas. |
220 virtual void Paint(SkCanvas* canvas, | 220 virtual void Paint(SkCanvas* canvas, |
221 Part part, | 221 Part part, |
222 State state, | 222 State state, |
223 const gfx::Rect& rect, | 223 const gfx::Rect& rect, |
224 const ExtraParams& extra) const = 0; | 224 const ExtraParams& extra) const = 0; |
225 | 225 |
| 226 // Paint part during state transition, used for overlay scrollbar state |
| 227 // transition animation. |
| 228 virtual void PaintStateTransition(SkCanvas* canvas, |
| 229 Part part, |
| 230 State startState, |
| 231 State endState, |
| 232 double progress, |
| 233 const gfx::Rect& rect) const { } |
| 234 |
226 // Supports theme specific colors. | 235 // Supports theme specific colors. |
227 void SetScrollbarColors(unsigned inactive_color, | 236 void SetScrollbarColors(unsigned inactive_color, |
228 unsigned active_color, | 237 unsigned active_color, |
229 unsigned track_color); | 238 unsigned track_color); |
230 | 239 |
231 // Colors for GetSystemColor(). | 240 // Colors for GetSystemColor(). |
232 enum ColorId { | 241 enum ColorId { |
233 // Windows | 242 // Windows |
234 kColorId_WindowBackground, | 243 kColorId_WindowBackground, |
235 // Dialogs | 244 // Dialogs |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 private: | 348 private: |
340 // Observers to notify when the native theme changes. | 349 // Observers to notify when the native theme changes. |
341 ObserverList<NativeThemeObserver> native_theme_observers_; | 350 ObserverList<NativeThemeObserver> native_theme_observers_; |
342 | 351 |
343 DISALLOW_COPY_AND_ASSIGN(NativeTheme); | 352 DISALLOW_COPY_AND_ASSIGN(NativeTheme); |
344 }; | 353 }; |
345 | 354 |
346 } // namespace ui | 355 } // namespace ui |
347 | 356 |
348 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ | 357 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ |
OLD | NEW |