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

Side by Side Diff: ui/views/widget/widget.h

Issue 290553002: Refactor menu dependency on aura/wm SetShadowType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for sky Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_VIEWS_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <stack> 9 #include <stack>
10 #include <vector> 10 #include <vector>
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 enum Ownership { 173 enum Ownership {
174 // Default. Creator is not responsible for managing the lifetime of the 174 // Default. Creator is not responsible for managing the lifetime of the
175 // Widget, it is destroyed when the corresponding NativeWidget is 175 // Widget, it is destroyed when the corresponding NativeWidget is
176 // destroyed. 176 // destroyed.
177 NATIVE_WIDGET_OWNS_WIDGET, 177 NATIVE_WIDGET_OWNS_WIDGET,
178 // Used when the Widget is owned by someone other than the NativeWidget, 178 // Used when the Widget is owned by someone other than the NativeWidget,
179 // e.g. a scoped_ptr in tests. 179 // e.g. a scoped_ptr in tests.
180 WIDGET_OWNS_NATIVE_WIDGET 180 WIDGET_OWNS_NATIVE_WIDGET
181 }; 181 };
182 182
183 enum ShadowType {
184 DEFAULT_SHADOW, // Use default shadow setting.
sky 2014/05/20 13:30:42 SHADOW_TYPE_DEFAULT, SHADOW_TYPE_NONE, SHADOW_TYPE
185 NO_SHADOW, // Don't draw any shadow.
186 DROP_SHADOW, // Draw a drop shadow that emphasizes Z-order
187 // relationship to other windows.
188 };
189
183 InitParams(); 190 InitParams();
184 explicit InitParams(Type type); 191 explicit InitParams(Type type);
185 ~InitParams(); 192 ~InitParams();
186 193
187 Type type; 194 Type type;
188 // If NULL, a default implementation will be constructed. 195 // If NULL, a default implementation will be constructed.
189 WidgetDelegate* delegate; 196 WidgetDelegate* delegate;
190 bool child; 197 bool child;
191 // If TRANSLUCENT_WINDOW, the widget may be fully or partially transparent. 198 // If TRANSLUCENT_WINDOW, the widget may be fully or partially transparent.
192 // If OPAQUE_WINDOW, we can perform optimizations based on the widget being 199 // If OPAQUE_WINDOW, we can perform optimizations based on the widget being
193 // fully opaque. Defaults to TRANSLUCENT_WINDOW if 200 // fully opaque. Defaults to TRANSLUCENT_WINDOW if
194 // ViewsDelegate::UseTransparentWindows(). Defaults to OPAQUE_WINDOW for 201 // ViewsDelegate::UseTransparentWindows(). Defaults to OPAQUE_WINDOW for
195 // non-window widgets. 202 // non-window widgets.
196 WindowOpacity opacity; 203 WindowOpacity opacity;
197 bool accept_events; 204 bool accept_events;
198 Activatable activatable; 205 Activatable activatable;
199 bool keep_on_top; 206 bool keep_on_top;
200 bool visible_on_all_workspaces; 207 bool visible_on_all_workspaces;
201 Ownership ownership; 208 Ownership ownership;
202 bool mirror_origin_in_rtl; 209 bool mirror_origin_in_rtl;
203 bool has_dropshadow; 210 ShadowType shadow_type;
204 // Specifies that the system default caption and icon should not be 211 // Specifies that the system default caption and icon should not be
205 // rendered, and that the client area should be equivalent to the window 212 // rendered, and that the client area should be equivalent to the window
206 // area. Only used on some platforms (Windows and Linux). 213 // area. Only used on some platforms (Windows and Linux).
207 bool remove_standard_frame; 214 bool remove_standard_frame;
208 // Only used by ShellWindow on Windows. Specifies that the default icon of 215 // Only used by ShellWindow on Windows. Specifies that the default icon of
209 // packaged app should be the system default icon. 216 // packaged app should be the system default icon.
210 bool use_system_default_icon; 217 bool use_system_default_icon;
211 // Whether the widget should be maximized or minimized. 218 // Whether the widget should be maximized or minimized.
212 ui::WindowShowState show_state; 219 ui::WindowShowState show_state;
213 // Should the widget be double buffered? Default is false. 220 // Should the widget be double buffered? Default is false.
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 bool movement_disabled_; 937 bool movement_disabled_;
931 938
932 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; 939 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_;
933 940
934 DISALLOW_COPY_AND_ASSIGN(Widget); 941 DISALLOW_COPY_AND_ASSIGN(Widget);
935 }; 942 };
936 943
937 } // namespace views 944 } // namespace views
938 945
939 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 946 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698