| 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 <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 bool is_top_level() const { return is_top_level_; } | 761 bool is_top_level() const { return is_top_level_; } |
| 762 | 762 |
| 763 // True when window movement via mouse interaction with the frame is disabled. | 763 // True when window movement via mouse interaction with the frame is disabled. |
| 764 bool movement_disabled() const { return movement_disabled_; } | 764 bool movement_disabled() const { return movement_disabled_; } |
| 765 void set_movement_disabled(bool disabled) { movement_disabled_ = disabled; } | 765 void set_movement_disabled(bool disabled) { movement_disabled_ = disabled; } |
| 766 | 766 |
| 767 // Returns the work area bounds of the screen the Widget belongs to. | 767 // Returns the work area bounds of the screen the Widget belongs to. |
| 768 gfx::Rect GetWorkAreaBoundsInScreen() const; | 768 gfx::Rect GetWorkAreaBoundsInScreen() const; |
| 769 | 769 |
| 770 // Creates and dispatches synthesized mouse move event using the current | 770 // Creates and dispatches synthesized mouse move event using the current |
| 771 // mouse location to refresh hovering status in the widget. | 771 // mouse location to refresh hovering status in the widget. By default events |
| 772 void SynthesizeMouseMoveEvent(); | 772 // won't be synthesized if the current mouse location is outside the bounds of |
| 773 // |this|, however you can force the events to be synthesized with |
| 774 // |forced|=true. |
| 775 void SynthesizeMouseMoveEvent(bool force = false); |
| 773 | 776 |
| 774 // Whether the widget supports translucency. | 777 // Whether the widget supports translucency. |
| 775 bool IsTranslucentWindowOpacitySupported() const; | 778 bool IsTranslucentWindowOpacitySupported() const; |
| 776 | 779 |
| 777 // Called when the delegate's CanResize or CanMaximize changes. | 780 // Called when the delegate's CanResize or CanMaximize changes. |
| 778 void OnSizeConstraintsChanged(); | 781 void OnSizeConstraintsChanged(); |
| 779 | 782 |
| 780 // Notification that our owner is closing. | 783 // Notification that our owner is closing. |
| 781 // NOTE: this is not invoked for aura as it's currently not needed there. | 784 // NOTE: this is not invoked for aura as it's currently not needed there. |
| 782 // Under aura menus close by way of activation getting reset when the owner | 785 // Under aura menus close by way of activation getting reset when the owner |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 bool movement_disabled_; | 991 bool movement_disabled_; |
| 989 | 992 |
| 990 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; | 993 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; |
| 991 | 994 |
| 992 DISALLOW_COPY_AND_ASSIGN(Widget); | 995 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 993 }; | 996 }; |
| 994 | 997 |
| 995 } // namespace views | 998 } // namespace views |
| 996 | 999 |
| 997 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 1000 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |