| 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_VIEW_H_ | 5 #ifndef UI_VIEWS_VIEW_H_ |
| 6 #define UI_VIEWS_VIEW_H_ | 6 #define UI_VIEWS_VIEW_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 virtual void ResetAccelerators(); | 749 virtual void ResetAccelerators(); |
| 750 | 750 |
| 751 // Overridden from AcceleratorTarget: | 751 // Overridden from AcceleratorTarget: |
| 752 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 752 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| 753 | 753 |
| 754 // Returns whether accelerators are enabled for this view. Accelerators are | 754 // Returns whether accelerators are enabled for this view. Accelerators are |
| 755 // enabled if the containing widget is visible and the view is enabled() and | 755 // enabled if the containing widget is visible and the view is enabled() and |
| 756 // IsDrawn() | 756 // IsDrawn() |
| 757 bool CanHandleAccelerators() const override; | 757 bool CanHandleAccelerators() const override; |
| 758 | 758 |
| 759 // Returns true if this view has registered to handle this accelerator and |
| 760 // can handle accelerators. |
| 761 bool HandlesAccelerator(const ui::Accelerator& accelerator); |
| 762 |
| 759 // Focus --------------------------------------------------------------------- | 763 // Focus --------------------------------------------------------------------- |
| 760 | 764 |
| 761 // Returns whether this view currently has the focus. | 765 // Returns whether this view currently has the focus. |
| 762 virtual bool HasFocus() const; | 766 virtual bool HasFocus() const; |
| 763 | 767 |
| 764 // Returns the view that should be selected next when pressing Tab. | 768 // Returns the view that should be selected next when pressing Tab. |
| 765 View* GetNextFocusableView(); | 769 View* GetNextFocusableView(); |
| 766 const View* GetNextFocusableView() const; | 770 const View* GetNextFocusableView() const; |
| 767 | 771 |
| 768 // Returns the view that should be selected next when pressing Shift-Tab. | 772 // Returns the view that should be selected next when pressing Shift-Tab. |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 // Belongs to this view, but it's reference-counted on some platforms | 1579 // Belongs to this view, but it's reference-counted on some platforms |
| 1576 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1580 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
| 1577 NativeViewAccessibility* native_view_accessibility_; | 1581 NativeViewAccessibility* native_view_accessibility_; |
| 1578 | 1582 |
| 1579 DISALLOW_COPY_AND_ASSIGN(View); | 1583 DISALLOW_COPY_AND_ASSIGN(View); |
| 1580 }; | 1584 }; |
| 1581 | 1585 |
| 1582 } // namespace views | 1586 } // namespace views |
| 1583 | 1587 |
| 1584 #endif // UI_VIEWS_VIEW_H_ | 1588 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |