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

Side by Side Diff: ui/native_theme/native_theme.h

Issue 1671313002: MacViews: Overlay Scrollbars with Show/Hide Animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comments and fixed nits Created 4 years, 10 months 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
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 "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"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // The state of the part. 90 // The state of the part.
91 enum State { 91 enum State {
92 // IDs defined as specific values for use in arrays. 92 // IDs defined as specific values for use in arrays.
93 kDisabled = 0, 93 kDisabled = 0,
94 kHovered = 1, 94 kHovered = 1,
95 kNormal = 2, 95 kNormal = 2,
96 kPressed = 3, 96 kPressed = 3,
97 kNumStates = kPressed + 1, 97 kNumStates = kPressed + 1,
98 }; 98 };
99 99
100 // Struct that holds overlay information.
101 // If is_overlay is set to false, then the part is not overlay-styled
102 // and the alpha value should be ignored.
103 struct OverlayParams {
104 double alpha;
105 double is_overlay;
tapted 2016/02/08 00:31:15 double -> bool?
spqchan 2016/02/09 21:21:25 Whoops, done
106 };
107
100 // Each structure below holds extra information needed when painting a given 108 // Each structure below holds extra information needed when painting a given
101 // part. 109 // part.
102 110
103 struct ButtonExtraParams { 111 struct ButtonExtraParams {
104 bool checked; 112 bool checked;
105 bool indeterminate; // Whether the button state is indeterminate. 113 bool indeterminate; // Whether the button state is indeterminate.
106 bool is_default; // Whether the button is default button. 114 bool is_default; // Whether the button is default button.
107 bool is_focused; 115 bool is_focused;
108 bool has_border; 116 bool has_border;
109 int classic_state; // Used on Windows when uxtheme is not available. 117 int classic_state; // Used on Windows when uxtheme is not available.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 double animated_seconds; 161 double animated_seconds;
154 bool determinate; 162 bool determinate;
155 int value_rect_x; 163 int value_rect_x;
156 int value_rect_y; 164 int value_rect_y;
157 int value_rect_width; 165 int value_rect_width;
158 int value_rect_height; 166 int value_rect_height;
159 }; 167 };
160 168
161 struct ScrollbarArrowExtraParams { 169 struct ScrollbarArrowExtraParams {
162 bool is_hovering; 170 bool is_hovering;
171 OverlayParams overlay;
163 }; 172 };
164 173
165 struct ScrollbarTrackExtraParams { 174 struct ScrollbarTrackExtraParams {
166 bool is_upper; 175 bool is_upper;
167 int track_x; 176 int track_x;
168 int track_y; 177 int track_y;
169 int track_width; 178 int track_width;
170 int track_height; 179 int track_height;
180 OverlayParams overlay;
171 int classic_state; // Used on Windows when uxtheme is not available. 181 int classic_state; // Used on Windows when uxtheme is not available.
172 }; 182 };
173 183
174 struct ScrollbarThumbExtraParams { 184 struct ScrollbarThumbExtraParams {
175 bool is_hovering; 185 bool is_hovering;
186 OverlayParams overlay;
176 }; 187 };
177 188
178 struct SliderExtraParams { 189 struct SliderExtraParams {
179 bool vertical; 190 bool vertical;
180 bool in_drag; 191 bool in_drag;
181 }; 192 };
182 193
183 struct TextFieldExtraParams { 194 struct TextFieldExtraParams {
184 bool is_text_area; 195 bool is_text_area;
185 bool is_listbox; 196 bool is_listbox;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 private: 387 private:
377 // Observers to notify when the native theme changes. 388 // Observers to notify when the native theme changes.
378 base::ObserverList<NativeThemeObserver> native_theme_observers_; 389 base::ObserverList<NativeThemeObserver> native_theme_observers_;
379 390
380 DISALLOW_COPY_AND_ASSIGN(NativeTheme); 391 DISALLOW_COPY_AND_ASSIGN(NativeTheme);
381 }; 392 };
382 393
383 } // namespace ui 394 } // namespace ui
384 395
385 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ 396 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_
OLDNEW
« no previous file with comments | « no previous file | ui/native_theme/native_theme_aura.h » ('j') | ui/views/cocoa/views_scrollbar_bridge.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698