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

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: Guard kFrameTopArea with #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 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 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
49 kFrameTopArea,
50 #endif
48 kInnerSpinButton, 51 kInnerSpinButton,
49 kMenuList, 52 kMenuList,
50 kMenuPopupBackground, 53 kMenuPopupBackground,
51 #if defined(OS_WIN) 54 #if defined(OS_WIN)
52 kMenuCheck, 55 kMenuCheck,
53 kMenuCheckBackground, 56 kMenuCheckBackground,
54 kMenuPopupArrow, 57 kMenuPopupArrow,
55 kMenuPopupGutter, 58 kMenuPopupGutter,
56 kMenuPopupSeparator, 59 kMenuPopupSeparator,
57 #endif 60 #endif
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 struct ButtonExtraParams { 105 struct ButtonExtraParams {
103 bool checked; 106 bool checked;
104 bool indeterminate; // Whether the button state is indeterminate. 107 bool indeterminate; // Whether the button state is indeterminate.
105 bool is_default; // Whether the button is default button. 108 bool is_default; // Whether the button is default button.
106 bool is_focused; 109 bool is_focused;
107 bool has_border; 110 bool has_border;
108 int classic_state; // Used on Windows when uxtheme is not available. 111 int classic_state; // Used on Windows when uxtheme is not available.
109 SkColor background_color; 112 SkColor background_color;
110 }; 113 };
111 114
115 struct FrameTopAreaExtraParams {
116 // Distinguishes between active (foreground) and inactive
117 // (background) window frame styles.
118 bool is_active;
119 bool incognito;
120 // True when Chromium renders the titlebar. False when the window
121 // manager renders the titlebar.
122 bool use_custom_frame;
123 // If the NativeTheme will paint a solid color, it should use
124 // |default_background_color|.
125 SkColor default_background_color;
126 };
127
112 struct InnerSpinButtonExtraParams { 128 struct InnerSpinButtonExtraParams {
113 bool spin_up; 129 bool spin_up;
114 bool read_only; 130 bool read_only;
115 int classic_state; // Used on Windows when uxtheme is not available. 131 int classic_state; // Used on Windows when uxtheme is not available.
116 }; 132 };
117 133
118 struct MenuArrowExtraParams { 134 struct MenuArrowExtraParams {
119 bool pointing_right; 135 bool pointing_right;
120 // Used for the disabled state to indicate if the item is both disabled and 136 // Used for the disabled state to indicate if the item is both disabled and
121 // selected. 137 // selected.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 struct TrackbarExtraParams { 216 struct TrackbarExtraParams {
201 bool vertical; 217 bool vertical;
202 int classic_state; // Used on Windows when uxtheme is not available. 218 int classic_state; // Used on Windows when uxtheme is not available.
203 }; 219 };
204 220
205 union NATIVE_THEME_EXPORT ExtraParams { 221 union NATIVE_THEME_EXPORT ExtraParams {
206 ExtraParams(); 222 ExtraParams();
207 ExtraParams(const ExtraParams& other); 223 ExtraParams(const ExtraParams& other);
208 224
209 ButtonExtraParams button; 225 ButtonExtraParams button;
226 FrameTopAreaExtraParams frame_top_area;
210 InnerSpinButtonExtraParams inner_spin; 227 InnerSpinButtonExtraParams inner_spin;
211 MenuArrowExtraParams menu_arrow; 228 MenuArrowExtraParams menu_arrow;
212 MenuCheckExtraParams menu_check; 229 MenuCheckExtraParams menu_check;
213 MenuItemExtraParams menu_item; 230 MenuItemExtraParams menu_item;
214 MenuListExtraParams menu_list; 231 MenuListExtraParams menu_list;
215 MenuBackgroundExtraParams menu_background; 232 MenuBackgroundExtraParams menu_background;
216 ProgressBarExtraParams progress_bar; 233 ProgressBarExtraParams progress_bar;
217 ScrollbarArrowExtraParams scrollbar_arrow; 234 ScrollbarArrowExtraParams scrollbar_arrow;
218 ScrollbarTrackExtraParams scrollbar_track; 235 ScrollbarTrackExtraParams scrollbar_track;
219 ScrollbarThumbExtraParams scrollbar_thumb; 236 ScrollbarThumbExtraParams scrollbar_thumb;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 private: 406 private:
390 // Observers to notify when the native theme changes. 407 // Observers to notify when the native theme changes.
391 base::ObserverList<NativeThemeObserver> native_theme_observers_; 408 base::ObserverList<NativeThemeObserver> native_theme_observers_;
392 409
393 DISALLOW_COPY_AND_ASSIGN(NativeTheme); 410 DISALLOW_COPY_AND_ASSIGN(NativeTheme);
394 }; 411 };
395 412
396 } // namespace ui 413 } // namespace ui
397 414
398 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ 415 #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