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_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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
190 }; | 190 }; |
191 | 191 |
192 InitParams(); | 192 InitParams(); |
193 explicit InitParams(Type type); | 193 explicit InitParams(Type type); |
194 ~InitParams(); | 194 ~InitParams(); |
195 | 195 |
196 Type type; | 196 Type type; |
197 // If NULL, a default implementation will be constructed. | 197 // If NULL, a default implementation will be constructed. |
198 WidgetDelegate* delegate; | 198 WidgetDelegate* delegate; |
199 bool child; | 199 bool child; |
200 // If TRANSLUCENT_WINDOW, the widget may be fully or partially transparent. | 200 // If TRANSLUCENT_WINDOW, the widget may be fully or partially transparent, |
201 // or not at all if IsTranslucentWindowOpacitySupported() is false. | |
sky
2014/07/17 15:52:32
That first sentence is meant to indicate what the
jackhou1
2014/07/18 00:41:15
Done.
| |
201 // If OPAQUE_WINDOW, we can perform optimizations based on the widget being | 202 // If OPAQUE_WINDOW, we can perform optimizations based on the widget being |
202 // fully opaque. Defaults to TRANSLUCENT_WINDOW if | 203 // fully opaque. Defaults to TRANSLUCENT_WINDOW if |
203 // ViewsDelegate::UseTransparentWindows(). Defaults to OPAQUE_WINDOW for | 204 // ViewsDelegate::UseTransparentWindows(). Defaults to OPAQUE_WINDOW for |
204 // non-window widgets. | 205 // non-window widgets. |
205 WindowOpacity opacity; | 206 WindowOpacity opacity; |
206 bool accept_events; | 207 bool accept_events; |
207 Activatable activatable; | 208 Activatable activatable; |
208 bool keep_on_top; | 209 bool keep_on_top; |
209 bool visible_on_all_workspaces; | 210 bool visible_on_all_workspaces; |
210 Ownership ownership; | 211 Ownership ownership; |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
719 gfx::Rect GetWorkAreaBoundsInScreen() const; | 720 gfx::Rect GetWorkAreaBoundsInScreen() const; |
720 | 721 |
721 // Creates and dispatches synthesized mouse move event using the current | 722 // Creates and dispatches synthesized mouse move event using the current |
722 // mouse location to refresh hovering status in the widget. | 723 // mouse location to refresh hovering status in the widget. |
723 void SynthesizeMouseMoveEvent(); | 724 void SynthesizeMouseMoveEvent(); |
724 | 725 |
725 // Called by our RootView after it has performed a Layout. Used to forward | 726 // Called by our RootView after it has performed a Layout. Used to forward |
726 // window sizing information to the window server on some platforms. | 727 // window sizing information to the window server on some platforms. |
727 void OnRootViewLayout(); | 728 void OnRootViewLayout(); |
728 | 729 |
730 // Whether the widget can have a transparent background. | |
sky
2014/07/17 15:52:32
Whether the widget supports translucency.
jackhou1
2014/07/18 00:41:16
Done.
| |
731 bool IsTranslucentWindowOpacitySupported() const; | |
732 | |
729 // Notification that our owner is closing. | 733 // Notification that our owner is closing. |
730 // NOTE: this is not invoked for aura as it's currently not needed there. | 734 // NOTE: this is not invoked for aura as it's currently not needed there. |
731 // Under aura menus close by way of activation getting reset when the owner | 735 // Under aura menus close by way of activation getting reset when the owner |
732 // closes. | 736 // closes. |
733 virtual void OnOwnerClosing(); | 737 virtual void OnOwnerClosing(); |
734 | 738 |
735 // Overridden from NativeWidgetDelegate: | 739 // Overridden from NativeWidgetDelegate: |
736 virtual bool IsModal() const OVERRIDE; | 740 virtual bool IsModal() const OVERRIDE; |
737 virtual bool IsDialogBox() const OVERRIDE; | 741 virtual bool IsDialogBox() const OVERRIDE; |
738 virtual bool CanActivate() const OVERRIDE; | 742 virtual bool CanActivate() const OVERRIDE; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
928 bool movement_disabled_; | 932 bool movement_disabled_; |
929 | 933 |
930 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; | 934 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; |
931 | 935 |
932 DISALLOW_COPY_AND_ASSIGN(Widget); | 936 DISALLOW_COPY_AND_ASSIGN(Widget); |
933 }; | 937 }; |
934 | 938 |
935 } // namespace views | 939 } // namespace views |
936 | 940 |
937 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 941 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
OLD | NEW |