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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 // are added to. The default implementation returns the contents view | 638 // are added to. The default implementation returns the contents view |
639 // if it exists and the root view otherwise. | 639 // if it exists and the root view otherwise. |
640 virtual View* GetChildViewParent(); | 640 virtual View* GetChildViewParent(); |
641 | 641 |
642 // True if the widget is considered top level widget. Top level widget | 642 // True if the widget is considered top level widget. Top level widget |
643 // is a widget of TYPE_WINDOW, TYPE_PANEL, TYPE_WINDOW_FRAMELESS, BUBBLE, | 643 // is a widget of TYPE_WINDOW, TYPE_PANEL, TYPE_WINDOW_FRAMELESS, BUBBLE, |
644 // POPUP or MENU, and has a focus manager and input method object associated | 644 // POPUP or MENU, and has a focus manager and input method object associated |
645 // with it. TYPE_CONTROL and TYPE_TOOLTIP is not considered top level. | 645 // with it. TYPE_CONTROL and TYPE_TOOLTIP is not considered top level. |
646 bool is_top_level() const { return is_top_level_; } | 646 bool is_top_level() const { return is_top_level_; } |
647 | 647 |
| 648 // True when window movement via mouse interaction with the frame is disabled. |
| 649 bool movement_disabled() const { return movement_disabled_; } |
| 650 void set_movement_disabled(bool disabled) { movement_disabled_ = disabled; } |
| 651 |
648 // Returns the work area bounds of the screen the Widget belongs to. | 652 // Returns the work area bounds of the screen the Widget belongs to. |
649 gfx::Rect GetWorkAreaBoundsInScreen() const; | 653 gfx::Rect GetWorkAreaBoundsInScreen() const; |
650 | 654 |
651 // Notification that our owner is closing. | 655 // Notification that our owner is closing. |
652 // NOTE: this is not invoked for aura as it's currently not needed there. | 656 // NOTE: this is not invoked for aura as it's currently not needed there. |
653 // Under aura menus close by way of activation getting reset when the owner | 657 // Under aura menus close by way of activation getting reset when the owner |
654 // closes. | 658 // closes. |
655 virtual void OnOwnerClosing(); | 659 virtual void OnOwnerClosing(); |
656 | 660 |
657 // Overridden from NativeWidgetDelegate: | 661 // Overridden from NativeWidgetDelegate: |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 // duplicate move events even though the mouse hasn't moved. | 833 // duplicate move events even though the mouse hasn't moved. |
830 bool last_mouse_event_was_move_; | 834 bool last_mouse_event_was_move_; |
831 gfx::Point last_mouse_event_position_; | 835 gfx::Point last_mouse_event_position_; |
832 | 836 |
833 // See description in GetRootLayers(). | 837 // See description in GetRootLayers(). |
834 std::vector<ui::Layer*> root_layers_; | 838 std::vector<ui::Layer*> root_layers_; |
835 | 839 |
836 // Is |root_layers_| out of date? | 840 // Is |root_layers_| out of date? |
837 bool root_layers_dirty_; | 841 bool root_layers_dirty_; |
838 | 842 |
| 843 // True when window movement via mouse interaction with the frame should be |
| 844 // disabled. |
| 845 bool movement_disabled_; |
| 846 |
839 DISALLOW_COPY_AND_ASSIGN(Widget); | 847 DISALLOW_COPY_AND_ASSIGN(Widget); |
840 }; | 848 }; |
841 | 849 |
842 } // namespace views | 850 } // namespace views |
843 | 851 |
844 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 852 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
OLD | NEW |