| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "third_party/skia/include/core/SkColor.h" | 11 #include "third_party/skia/include/core/SkColor.h" |
| 12 #include "ui/base/models/menu_separator_types.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
| 13 #include "ui/native_theme/native_theme_export.h" | 14 #include "ui/native_theme/native_theme_export.h" |
| 14 | 15 |
| 15 class SkCanvas; | 16 class SkCanvas; |
| 16 | 17 |
| 17 namespace gfx { | 18 namespace gfx { |
| 18 class Rect; | 19 class Rect; |
| 19 class Size; | 20 class Size; |
| 20 } | 21 } |
| 21 | 22 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 47 kCheckbox, | 48 kCheckbox, |
| 48 kFrameTopArea, | 49 kFrameTopArea, |
| 49 kInnerSpinButton, | 50 kInnerSpinButton, |
| 50 kMenuList, | 51 kMenuList, |
| 51 kMenuPopupBackground, | 52 kMenuPopupBackground, |
| 52 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
| 53 kMenuCheck, | 54 kMenuCheck, |
| 54 kMenuCheckBackground, | 55 kMenuCheckBackground, |
| 55 kMenuPopupArrow, | 56 kMenuPopupArrow, |
| 56 kMenuPopupGutter, | 57 kMenuPopupGutter, |
| 58 #endif |
| 57 kMenuPopupSeparator, | 59 kMenuPopupSeparator, |
| 58 #endif | |
| 59 kMenuItemBackground, | 60 kMenuItemBackground, |
| 60 kProgressBar, | 61 kProgressBar, |
| 61 kPushButton, | 62 kPushButton, |
| 62 kRadio, | 63 kRadio, |
| 63 | 64 |
| 64 // The order of the arrow enums is important, do not change without also | 65 // The order of the arrow enums is important, do not change without also |
| 65 // changing the code in platform implementations. | 66 // changing the code in platform implementations. |
| 66 kScrollbarDownArrow, | 67 kScrollbarDownArrow, |
| 67 kScrollbarLeftArrow, | 68 kScrollbarLeftArrow, |
| 68 kScrollbarRightArrow, | 69 kScrollbarRightArrow, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 bool is_selected; | 137 bool is_selected; |
| 137 }; | 138 }; |
| 138 | 139 |
| 139 struct MenuCheckExtraParams { | 140 struct MenuCheckExtraParams { |
| 140 bool is_radio; | 141 bool is_radio; |
| 141 // Used for the disabled state to indicate if the item is both disabled and | 142 // Used for the disabled state to indicate if the item is both disabled and |
| 142 // selected. | 143 // selected. |
| 143 bool is_selected; | 144 bool is_selected; |
| 144 }; | 145 }; |
| 145 | 146 |
| 147 struct MenuSeparatorExtraParams { |
| 148 const gfx::Rect* paint_rect; |
| 149 MenuSeparatorType type; |
| 150 }; |
| 151 |
| 146 struct MenuItemExtraParams { | 152 struct MenuItemExtraParams { |
| 147 bool is_selected; | 153 bool is_selected; |
| 148 int corner_radius; | 154 int corner_radius; |
| 149 }; | 155 }; |
| 150 | 156 |
| 151 struct MenuListExtraParams { | 157 struct MenuListExtraParams { |
| 152 bool has_border; | 158 bool has_border; |
| 153 bool has_border_radius; | 159 bool has_border_radius; |
| 154 int arrow_x; | 160 int arrow_x; |
| 155 int arrow_y; | 161 int arrow_y; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 union NATIVE_THEME_EXPORT ExtraParams { | 225 union NATIVE_THEME_EXPORT ExtraParams { |
| 220 ExtraParams(); | 226 ExtraParams(); |
| 221 ExtraParams(const ExtraParams& other); | 227 ExtraParams(const ExtraParams& other); |
| 222 | 228 |
| 223 ButtonExtraParams button; | 229 ButtonExtraParams button; |
| 224 FrameTopAreaExtraParams frame_top_area; | 230 FrameTopAreaExtraParams frame_top_area; |
| 225 InnerSpinButtonExtraParams inner_spin; | 231 InnerSpinButtonExtraParams inner_spin; |
| 226 MenuArrowExtraParams menu_arrow; | 232 MenuArrowExtraParams menu_arrow; |
| 227 MenuCheckExtraParams menu_check; | 233 MenuCheckExtraParams menu_check; |
| 228 MenuItemExtraParams menu_item; | 234 MenuItemExtraParams menu_item; |
| 235 MenuSeparatorExtraParams menu_separator; |
| 229 MenuListExtraParams menu_list; | 236 MenuListExtraParams menu_list; |
| 230 MenuBackgroundExtraParams menu_background; | 237 MenuBackgroundExtraParams menu_background; |
| 231 ProgressBarExtraParams progress_bar; | 238 ProgressBarExtraParams progress_bar; |
| 232 ScrollbarArrowExtraParams scrollbar_arrow; | 239 ScrollbarArrowExtraParams scrollbar_arrow; |
| 233 ScrollbarTrackExtraParams scrollbar_track; | 240 ScrollbarTrackExtraParams scrollbar_track; |
| 234 ScrollbarThumbExtraParams scrollbar_thumb; | 241 ScrollbarThumbExtraParams scrollbar_thumb; |
| 235 SliderExtraParams slider; | 242 SliderExtraParams slider; |
| 236 TextFieldExtraParams text_field; | 243 TextFieldExtraParams text_field; |
| 237 TrackbarExtraParams trackbar; | 244 TrackbarExtraParams trackbar; |
| 238 }; | 245 }; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 private: | 411 private: |
| 405 // Observers to notify when the native theme changes. | 412 // Observers to notify when the native theme changes. |
| 406 base::ObserverList<NativeThemeObserver> native_theme_observers_; | 413 base::ObserverList<NativeThemeObserver> native_theme_observers_; |
| 407 | 414 |
| 408 DISALLOW_COPY_AND_ASSIGN(NativeTheme); | 415 DISALLOW_COPY_AND_ASSIGN(NativeTheme); |
| 409 }; | 416 }; |
| 410 | 417 |
| 411 } // namespace ui | 418 } // namespace ui |
| 412 | 419 |
| 413 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ | 420 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ |
| OLD | NEW |