| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // Translucent windows may not always be supported. Use |
| 202 // IsTranslucentWindowOpacitySupported to determine if translucent windows |
| 203 // are supported. |
| 201 // If OPAQUE_WINDOW, we can perform optimizations based on the widget being | 204 // If OPAQUE_WINDOW, we can perform optimizations based on the widget being |
| 202 // fully opaque. Defaults to TRANSLUCENT_WINDOW if | 205 // fully opaque. Defaults to TRANSLUCENT_WINDOW if |
| 203 // ViewsDelegate::UseTransparentWindows(). Defaults to OPAQUE_WINDOW for | 206 // ViewsDelegate::UseTransparentWindows(). Defaults to OPAQUE_WINDOW for |
| 204 // non-window widgets. | 207 // non-window widgets. |
| 205 WindowOpacity opacity; | 208 WindowOpacity opacity; |
| 206 bool accept_events; | 209 bool accept_events; |
| 207 Activatable activatable; | 210 Activatable activatable; |
| 208 bool keep_on_top; | 211 bool keep_on_top; |
| 209 bool visible_on_all_workspaces; | 212 bool visible_on_all_workspaces; |
| 210 Ownership ownership; | 213 Ownership ownership; |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 gfx::Rect GetWorkAreaBoundsInScreen() const; | 722 gfx::Rect GetWorkAreaBoundsInScreen() const; |
| 720 | 723 |
| 721 // Creates and dispatches synthesized mouse move event using the current | 724 // Creates and dispatches synthesized mouse move event using the current |
| 722 // mouse location to refresh hovering status in the widget. | 725 // mouse location to refresh hovering status in the widget. |
| 723 void SynthesizeMouseMoveEvent(); | 726 void SynthesizeMouseMoveEvent(); |
| 724 | 727 |
| 725 // Called by our RootView after it has performed a Layout. Used to forward | 728 // Called by our RootView after it has performed a Layout. Used to forward |
| 726 // window sizing information to the window server on some platforms. | 729 // window sizing information to the window server on some platforms. |
| 727 void OnRootViewLayout(); | 730 void OnRootViewLayout(); |
| 728 | 731 |
| 732 // Whether the widget supports translucency. |
| 733 bool IsTranslucentWindowOpacitySupported() const; |
| 734 |
| 729 // Notification that our owner is closing. | 735 // Notification that our owner is closing. |
| 730 // NOTE: this is not invoked for aura as it's currently not needed there. | 736 // 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 | 737 // Under aura menus close by way of activation getting reset when the owner |
| 732 // closes. | 738 // closes. |
| 733 virtual void OnOwnerClosing(); | 739 virtual void OnOwnerClosing(); |
| 734 | 740 |
| 735 // Overridden from NativeWidgetDelegate: | 741 // Overridden from NativeWidgetDelegate: |
| 736 virtual bool IsModal() const OVERRIDE; | 742 virtual bool IsModal() const OVERRIDE; |
| 737 virtual bool IsDialogBox() const OVERRIDE; | 743 virtual bool IsDialogBox() const OVERRIDE; |
| 738 virtual bool CanActivate() const OVERRIDE; | 744 virtual bool CanActivate() const OVERRIDE; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 bool movement_disabled_; | 934 bool movement_disabled_; |
| 929 | 935 |
| 930 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; | 936 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; |
| 931 | 937 |
| 932 DISALLOW_COPY_AND_ASSIGN(Widget); | 938 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 933 }; | 939 }; |
| 934 | 940 |
| 935 } // namespace views | 941 } // namespace views |
| 936 | 942 |
| 937 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 943 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |