| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 void set_focusable(bool focusable) { focusable_ = focusable; } | 667 void set_focusable(bool focusable) { focusable_ = focusable; } |
| 668 | 668 |
| 669 // Returns true if this view is capable of taking focus. | 669 // Returns true if this view is capable of taking focus. |
| 670 bool focusable() const { return focusable_ && enabled_ && visible_; } | 670 bool focusable() const { return focusable_ && enabled_ && visible_; } |
| 671 | 671 |
| 672 // Returns true if this view is |focusable_|, |enabled_| and drawn. | 672 // Returns true if this view is |focusable_|, |enabled_| and drawn. |
| 673 virtual bool IsFocusable() const; | 673 virtual bool IsFocusable() const; |
| 674 | 674 |
| 675 // Return whether this view is focusable when the user requires full keyboard | 675 // Return whether this view is focusable when the user requires full keyboard |
| 676 // access, even though it may not be normally focusable. | 676 // access, even though it may not be normally focusable. |
| 677 bool IsAccessibilityFocusableInRootView() const; | 677 bool IsAccessibilityFocusable() const; |
| 678 | 678 |
| 679 // Set whether this view can be made focusable if the user requires | 679 // Set whether this view can be made focusable if the user requires |
| 680 // full keyboard access, even though it's not normally focusable. | 680 // full keyboard access, even though it's not normally focusable. |
| 681 // Note that this is false by default. | 681 // Note that this is false by default. |
| 682 void set_accessibility_focusable(bool accessibility_focusable) { | 682 void set_accessibility_focusable(bool accessibility_focusable) { |
| 683 accessibility_focusable_ = accessibility_focusable; | 683 accessibility_focusable_ = accessibility_focusable; |
| 684 } | 684 } |
| 685 | 685 |
| 686 // Convenience method to retrieve the FocusManager associated with the | 686 // Convenience method to retrieve the FocusManager associated with the |
| 687 // Widget that contains this view. This can return NULL if this view is not | 687 // Widget that contains this view. This can return NULL if this view is not |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1426 base::win::ScopedComPtr<NativeViewAccessibilityWin> | 1426 base::win::ScopedComPtr<NativeViewAccessibilityWin> |
| 1427 native_view_accessibility_win_; | 1427 native_view_accessibility_win_; |
| 1428 #endif | 1428 #endif |
| 1429 | 1429 |
| 1430 DISALLOW_COPY_AND_ASSIGN(View); | 1430 DISALLOW_COPY_AND_ASSIGN(View); |
| 1431 }; | 1431 }; |
| 1432 | 1432 |
| 1433 } // namespace views | 1433 } // namespace views |
| 1434 | 1434 |
| 1435 #endif // UI_VIEWS_VIEW_H_ | 1435 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |