| 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 NativeWidget* native_widget(); | 624 NativeWidget* native_widget(); |
| 625 | 625 |
| 626 internal::NativeWidgetPrivate* native_widget_private() { | 626 internal::NativeWidgetPrivate* native_widget_private() { |
| 627 return native_widget_; | 627 return native_widget_; |
| 628 } | 628 } |
| 629 const internal::NativeWidgetPrivate* native_widget_private() const { | 629 const internal::NativeWidgetPrivate* native_widget_private() const { |
| 630 return native_widget_; | 630 return native_widget_; |
| 631 } | 631 } |
| 632 | 632 |
| 633 // Sets capture to the specified view. This makes it so that all mouse, touch | 633 // Sets capture to the specified view. This makes it so that all mouse, touch |
| 634 // and gesture events go to |view|. | 634 // and gesture events go to |view|. |view| may be NULL, in which case the |
| 635 // widget will still capture events but they will be handled by the view |
| 636 // that would normally handle them. |
| 635 void SetCapture(View* view); | 637 void SetCapture(View* view); |
| 636 | 638 |
| 637 // Releases capture. | 639 // Releases capture. |
| 638 void ReleaseCapture(); | 640 void ReleaseCapture(); |
| 639 | 641 |
| 640 // Returns true if the widget has capture. | 642 // Returns true if the widget has capture. |
| 641 bool HasCapture(); | 643 bool HasCapture(); |
| 642 | 644 |
| 643 // Invoked when the tooltip text changes for the specified views. | 645 // Invoked when the tooltip text changes for the specified views. |
| 644 void TooltipTextChanged(View* view); | 646 void TooltipTextChanged(View* view); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 // If true, a touch device is currently down. | 847 // If true, a touch device is currently down. |
| 846 bool is_touch_down_; | 848 bool is_touch_down_; |
| 847 | 849 |
| 848 // TODO(beng): Remove NativeWidgetGtk's dependence on these: | 850 // TODO(beng): Remove NativeWidgetGtk's dependence on these: |
| 849 // The following are used to detect duplicate mouse move events and not | 851 // The following are used to detect duplicate mouse move events and not |
| 850 // deliver them. Displaying a window may result in the system generating | 852 // deliver them. Displaying a window may result in the system generating |
| 851 // duplicate move events even though the mouse hasn't moved. | 853 // duplicate move events even though the mouse hasn't moved. |
| 852 bool last_mouse_event_was_move_; | 854 bool last_mouse_event_was_move_; |
| 853 gfx::Point last_mouse_event_position_; | 855 gfx::Point last_mouse_event_position_; |
| 854 | 856 |
| 857 // True if event capture was set via SetCapture(). Reset to false when |
| 858 // ReleaseCapture() is invoked. |
| 859 bool capture_explicitly_set_; |
| 860 |
| 855 // See description in GetRootLayers(). | 861 // See description in GetRootLayers(). |
| 856 std::vector<ui::Layer*> root_layers_; | 862 std::vector<ui::Layer*> root_layers_; |
| 857 | 863 |
| 858 // Is |root_layers_| out of date? | 864 // Is |root_layers_| out of date? |
| 859 bool root_layers_dirty_; | 865 bool root_layers_dirty_; |
| 860 | 866 |
| 861 // True when window movement via mouse interaction with the frame should be | 867 // True when window movement via mouse interaction with the frame should be |
| 862 // disabled. | 868 // disabled. |
| 863 bool movement_disabled_; | 869 bool movement_disabled_; |
| 864 | 870 |
| 865 DISALLOW_COPY_AND_ASSIGN(Widget); | 871 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 866 }; | 872 }; |
| 867 | 873 |
| 868 } // namespace views | 874 } // namespace views |
| 869 | 875 |
| 870 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 876 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |