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

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

Issue 2628043002: Gtk3: Render a GtkHeaderBar as the background of the tab strip (Closed)
Patch Set: Handle incognito Created 3 years, 11 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 27 matching lines...) Expand all
38 // ExtraParams union. Each part that requires more information has its own 38 // ExtraParams union. Each part that requires more information has its own
39 // field in the union. 39 // field in the union.
40 // 40 //
41 // NativeTheme also supports getting the default size of a given part with 41 // NativeTheme also supports getting the default size of a given part with
42 // the GetPartSize() method. 42 // the GetPartSize() method.
43 class NATIVE_THEME_EXPORT NativeTheme { 43 class NATIVE_THEME_EXPORT NativeTheme {
44 public: 44 public:
45 // The part to be painted / sized. 45 // The part to be painted / sized.
46 enum Part { 46 enum Part {
47 kCheckbox, 47 kCheckbox,
48 kFrameTopArea,
48 kInnerSpinButton, 49 kInnerSpinButton,
49 kMenuList, 50 kMenuList,
50 kMenuPopupBackground, 51 kMenuPopupBackground,
51 #if defined(OS_WIN) 52 #if defined(OS_WIN)
52 kMenuCheck, 53 kMenuCheck,
53 kMenuCheckBackground, 54 kMenuCheckBackground,
54 kMenuPopupArrow, 55 kMenuPopupArrow,
55 kMenuPopupGutter, 56 kMenuPopupGutter,
56 kMenuPopupSeparator, 57 kMenuPopupSeparator,
57 #endif 58 #endif
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 struct ButtonExtraParams { 103 struct ButtonExtraParams {
103 bool checked; 104 bool checked;
104 bool indeterminate; // Whether the button state is indeterminate. 105 bool indeterminate; // Whether the button state is indeterminate.
105 bool is_default; // Whether the button is default button. 106 bool is_default; // Whether the button is default button.
106 bool is_focused; 107 bool is_focused;
107 bool has_border; 108 bool has_border;
108 int classic_state; // Used on Windows when uxtheme is not available. 109 int classic_state; // Used on Windows when uxtheme is not available.
109 SkColor background_color; 110 SkColor background_color;
110 }; 111 };
111 112
113 struct FrameTopAreaExtraParams {
114 // Distinguishes between active (foreground) and inactive
115 // (background) window frame styles
Peter Kasting 2017/01/12 22:02:56 Nit: Trailing period.
Tom (Use chromium acct) 2017/01/12 22:54:13 Done.
116 bool is_active;
117 bool incognito;
118 // If the NativeTheme will paint a solid color, it should use
119 // |default_background_color|.
120 SkColor default_background_color;
121 };
122
112 struct InnerSpinButtonExtraParams { 123 struct InnerSpinButtonExtraParams {
113 bool spin_up; 124 bool spin_up;
114 bool read_only; 125 bool read_only;
115 int classic_state; // Used on Windows when uxtheme is not available. 126 int classic_state; // Used on Windows when uxtheme is not available.
116 }; 127 };
117 128
118 struct MenuArrowExtraParams { 129 struct MenuArrowExtraParams {
119 bool pointing_right; 130 bool pointing_right;
120 // Used for the disabled state to indicate if the item is both disabled and 131 // Used for the disabled state to indicate if the item is both disabled and
121 // selected. 132 // selected.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 struct TrackbarExtraParams { 211 struct TrackbarExtraParams {
201 bool vertical; 212 bool vertical;
202 int classic_state; // Used on Windows when uxtheme is not available. 213 int classic_state; // Used on Windows when uxtheme is not available.
203 }; 214 };
204 215
205 union NATIVE_THEME_EXPORT ExtraParams { 216 union NATIVE_THEME_EXPORT ExtraParams {
206 ExtraParams(); 217 ExtraParams();
207 ExtraParams(const ExtraParams& other); 218 ExtraParams(const ExtraParams& other);
208 219
209 ButtonExtraParams button; 220 ButtonExtraParams button;
221 FrameTopAreaExtraParams frame_top_area;
210 InnerSpinButtonExtraParams inner_spin; 222 InnerSpinButtonExtraParams inner_spin;
211 MenuArrowExtraParams menu_arrow; 223 MenuArrowExtraParams menu_arrow;
212 MenuCheckExtraParams menu_check; 224 MenuCheckExtraParams menu_check;
213 MenuItemExtraParams menu_item; 225 MenuItemExtraParams menu_item;
214 MenuListExtraParams menu_list; 226 MenuListExtraParams menu_list;
215 MenuBackgroundExtraParams menu_background; 227 MenuBackgroundExtraParams menu_background;
216 ProgressBarExtraParams progress_bar; 228 ProgressBarExtraParams progress_bar;
217 ScrollbarArrowExtraParams scrollbar_arrow; 229 ScrollbarArrowExtraParams scrollbar_arrow;
218 ScrollbarTrackExtraParams scrollbar_track; 230 ScrollbarTrackExtraParams scrollbar_track;
219 ScrollbarThumbExtraParams scrollbar_thumb; 231 ScrollbarThumbExtraParams scrollbar_thumb;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 private: 399 private:
388 // Observers to notify when the native theme changes. 400 // Observers to notify when the native theme changes.
389 base::ObserverList<NativeThemeObserver> native_theme_observers_; 401 base::ObserverList<NativeThemeObserver> native_theme_observers_;
390 402
391 DISALLOW_COPY_AND_ASSIGN(NativeTheme); 403 DISALLOW_COPY_AND_ASSIGN(NativeTheme);
392 }; 404 };
393 405
394 } // namespace ui 406 } // namespace ui
395 407
396 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ 408 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | ui/native_theme/native_theme_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698