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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
786 // Creates the RootView to be used within this Widget. Subclasses may override | 786 // Creates the RootView to be used within this Widget. Subclasses may override |
787 // to create custom RootViews that do specialized event processing. | 787 // to create custom RootViews that do specialized event processing. |
788 // TODO(beng): Investigate whether or not this is needed. | 788 // TODO(beng): Investigate whether or not this is needed. |
789 virtual internal::RootView* CreateRootView(); | 789 virtual internal::RootView* CreateRootView(); |
790 | 790 |
791 // Provided to allow the NativeWidget implementations to destroy the RootView | 791 // Provided to allow the NativeWidget implementations to destroy the RootView |
792 // _before_ the focus manager/tooltip manager. | 792 // _before_ the focus manager/tooltip manager. |
793 // TODO(beng): remove once we fold those objects onto this one. | 793 // TODO(beng): remove once we fold those objects onto this one. |
794 void DestroyRootView(); | 794 void DestroyRootView(); |
795 | 795 |
796 bool child_drag_in_progress() const { return child_drag_in_progress_; } | |
797 void set_child_drag_in_progress(bool child_drag_in_progress) { | |
798 child_drag_in_progress_ = child_drag_in_progress; | |
799 } | |
800 | |
796 private: | 801 private: |
797 friend class ComboboxTest; | 802 friend class ComboboxTest; |
798 friend class TextfieldTest; | 803 friend class TextfieldTest; |
799 | 804 |
800 // Sets the value of |disable_inactive_rendering_|. If the value changes, | 805 // Sets the value of |disable_inactive_rendering_|. If the value changes, |
801 // both the NonClientView and WidgetDelegate are notified. | 806 // both the NonClientView and WidgetDelegate are notified. |
802 void SetInactiveRenderingDisabled(bool value); | 807 void SetInactiveRenderingDisabled(bool value); |
803 | 808 |
804 // Persists the window's restored position and "show" state using the | 809 // Persists the window's restored position and "show" state using the |
805 // window delegate. | 810 // window delegate. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
851 // must be destroyed AFTER root_view_. This is enforced in DestroyRootView(). | 856 // must be destroyed AFTER root_view_. This is enforced in DestroyRootView(). |
852 scoped_ptr<FocusManager> focus_manager_; | 857 scoped_ptr<FocusManager> focus_manager_; |
853 | 858 |
854 // A theme provider to use when no other theme provider is specified. | 859 // A theme provider to use when no other theme provider is specified. |
855 scoped_ptr<ui::DefaultThemeProvider> default_theme_provider_; | 860 scoped_ptr<ui::DefaultThemeProvider> default_theme_provider_; |
856 | 861 |
857 // Valid for the lifetime of RunShellDrag(), indicates the view the drag | 862 // Valid for the lifetime of RunShellDrag(), indicates the view the drag |
858 // started from. | 863 // started from. |
859 View* dragged_view_; | 864 View* dragged_view_; |
860 | 865 |
866 // Whether or not a child of this widget is in the middle of a drag. | |
867 bool child_drag_in_progress_; | |
Devlin
2014/07/09 18:28:44
This name isn't strictly true, since only the top-
| |
868 | |
861 // See class documentation for Widget above for a note about ownership. | 869 // See class documentation for Widget above for a note about ownership. |
862 InitParams::Ownership ownership_; | 870 InitParams::Ownership ownership_; |
863 | 871 |
864 // See set_is_secondary_widget(). | 872 // See set_is_secondary_widget(). |
865 bool is_secondary_widget_; | 873 bool is_secondary_widget_; |
866 | 874 |
867 // The current frame type in use by this window. Defaults to | 875 // The current frame type in use by this window. Defaults to |
868 // FRAME_TYPE_DEFAULT. | 876 // FRAME_TYPE_DEFAULT. |
869 FrameType frame_type_; | 877 FrameType frame_type_; |
870 | 878 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
928 bool movement_disabled_; | 936 bool movement_disabled_; |
929 | 937 |
930 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; | 938 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; |
931 | 939 |
932 DISALLOW_COPY_AND_ASSIGN(Widget); | 940 DISALLOW_COPY_AND_ASSIGN(Widget); |
933 }; | 941 }; |
934 | 942 |
935 } // namespace views | 943 } // namespace views |
936 | 944 |
937 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 945 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
OLD | NEW |