| 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 <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 void set_accessibility_focusable(bool accessibility_focusable) { | 718 void set_accessibility_focusable(bool accessibility_focusable) { |
| 719 accessibility_focusable_ = accessibility_focusable; | 719 accessibility_focusable_ = accessibility_focusable; |
| 720 } | 720 } |
| 721 | 721 |
| 722 // Convenience method to retrieve the FocusManager associated with the | 722 // Convenience method to retrieve the FocusManager associated with the |
| 723 // Widget that contains this view. This can return NULL if this view is not | 723 // Widget that contains this view. This can return NULL if this view is not |
| 724 // part of a view hierarchy with a Widget. | 724 // part of a view hierarchy with a Widget. |
| 725 virtual FocusManager* GetFocusManager(); | 725 virtual FocusManager* GetFocusManager(); |
| 726 virtual const FocusManager* GetFocusManager() const; | 726 virtual const FocusManager* GetFocusManager() const; |
| 727 | 727 |
| 728 // Request the keyboard focus. The receiving view will become the | 728 // Request keyboard focus. The receiving view will become the focused view. |
| 729 // focused view. | 729 void RequestFocus(); |
| 730 virtual void RequestFocus(); | |
| 731 | 730 |
| 732 // Invoked when a view is about to be requested for focus due to the focus | 731 // Invoked when a view is about to be requested for focus due to the focus |
| 733 // traversal. Reverse is this request was generated going backward | 732 // traversal. Reverse is this request was generated going backward |
| 734 // (Shift-Tab). | 733 // (Shift-Tab). |
| 735 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) {} | 734 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) {} |
| 736 | 735 |
| 737 // Invoked when a key is pressed before the key event is processed (and | 736 // Invoked when a key is pressed before the key event is processed (and |
| 738 // potentially eaten) by the focus manager for tab traversal, accelerators and | 737 // potentially eaten) by the focus manager for tab traversal, accelerators and |
| 739 // other focus related actions. | 738 // other focus related actions. |
| 740 // The default implementation returns false, ensuring that tab traversal and | 739 // The default implementation returns false, ensuring that tab traversal and |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 // Belongs to this view, but it's reference-counted on some platforms | 1494 // Belongs to this view, but it's reference-counted on some platforms |
| 1496 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1495 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
| 1497 NativeViewAccessibility* native_view_accessibility_; | 1496 NativeViewAccessibility* native_view_accessibility_; |
| 1498 | 1497 |
| 1499 DISALLOW_COPY_AND_ASSIGN(View); | 1498 DISALLOW_COPY_AND_ASSIGN(View); |
| 1500 }; | 1499 }; |
| 1501 | 1500 |
| 1502 } // namespace views | 1501 } // namespace views |
| 1503 | 1502 |
| 1504 #endif // UI_VIEWS_VIEW_H_ | 1503 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |