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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 kMaxPart, | 83 kMaxPart, |
84 }; | 84 }; |
85 | 85 |
86 // The state of the part. | 86 // The state of the part. |
87 enum State { | 87 enum State { |
88 // IDs defined as specific values for use in arrays. | 88 // IDs defined as specific values for use in arrays. |
89 kDisabled = 0, | 89 kDisabled = 0, |
90 kHovered = 1, | 90 kHovered = 1, |
91 kNormal = 2, | 91 kNormal = 2, |
92 kPressed = 3, | 92 kPressed = 3, |
93 kMaxState = 4, | 93 kNumStates = kPressed + 1, |
94 }; | 94 }; |
95 | 95 |
96 // Each structure below holds extra information needed when painting a given | 96 // Each structure below holds extra information needed when painting a given |
97 // part. | 97 // part. |
98 | 98 |
99 struct ButtonExtraParams { | 99 struct ButtonExtraParams { |
100 bool checked; | 100 bool checked; |
101 bool indeterminate; // Whether the button state is indeterminate. | 101 bool indeterminate; // Whether the button state is indeterminate. |
102 bool is_default; // Whether the button is default button. | 102 bool is_default; // Whether the button is default button. |
103 bool is_focused; | 103 bool is_focused; |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 private: | 349 private: |
350 // Observers to notify when the native theme changes. | 350 // Observers to notify when the native theme changes. |
351 ObserverList<NativeThemeObserver> native_theme_observers_; | 351 ObserverList<NativeThemeObserver> native_theme_observers_; |
352 | 352 |
353 DISALLOW_COPY_AND_ASSIGN(NativeTheme); | 353 DISALLOW_COPY_AND_ASSIGN(NativeTheme); |
354 }; | 354 }; |
355 | 355 |
356 } // namespace ui | 356 } // namespace ui |
357 | 357 |
358 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ | 358 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ |
OLD | NEW |