OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 30 matching lines...) Expand all Loading... |
41 static AXMenuListPopup* Create(AXObjectCacheImpl& ax_object_cache) { | 41 static AXMenuListPopup* Create(AXObjectCacheImpl& ax_object_cache) { |
42 return new AXMenuListPopup(ax_object_cache); | 42 return new AXMenuListPopup(ax_object_cache); |
43 } | 43 } |
44 | 44 |
45 bool IsEnabled() const override; | 45 bool IsEnabled() const override; |
46 bool IsOffScreen() const override; | 46 bool IsOffScreen() const override; |
47 | 47 |
48 void DidUpdateActiveOption(int option_index); | 48 void DidUpdateActiveOption(int option_index); |
49 void DidShow(); | 49 void DidShow(); |
50 void DidHide(); | 50 void DidHide(); |
51 AXObject* ActiveDescendant() final; | 51 AXObjectImpl* ActiveDescendant() final; |
52 | 52 |
53 private: | 53 private: |
54 explicit AXMenuListPopup(AXObjectCacheImpl&); | 54 explicit AXMenuListPopup(AXObjectCacheImpl&); |
55 | 55 |
56 bool IsMenuListPopup() const override { return true; } | 56 bool IsMenuListPopup() const override { return true; } |
57 | 57 |
58 AccessibilityRole RoleValue() const override { return kMenuListPopupRole; } | 58 AccessibilityRole RoleValue() const override { return kMenuListPopupRole; } |
59 | 59 |
60 bool IsVisible() const override; | 60 bool IsVisible() const override; |
61 bool Press() override; | 61 bool Press() override; |
62 void AddChildren() override; | 62 void AddChildren() override; |
63 void UpdateChildrenIfNecessary() override; | 63 void UpdateChildrenIfNecessary() override; |
64 bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override; | 64 bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override; |
65 | 65 |
66 AXMenuListOption* MenuListOptionAXObject(HTMLElement*) const; | 66 AXMenuListOption* MenuListOptionAXObject(HTMLElement*) const; |
67 int GetSelectedIndex() const; | 67 int GetSelectedIndex() const; |
68 | 68 |
69 // Note that this may be -1 if nothing is selected. | 69 // Note that this may be -1 if nothing is selected. |
70 int active_index_; | 70 int active_index_; |
71 }; | 71 }; |
72 | 72 |
73 DEFINE_AX_OBJECT_TYPE_CASTS(AXMenuListPopup, IsMenuListPopup()); | 73 DEFINE_AX_OBJECT_TYPE_CASTS(AXMenuListPopup, IsMenuListPopup()); |
74 | 74 |
75 } // namespace blink | 75 } // namespace blink |
76 | 76 |
77 #endif // AXMenuListPopup_h | 77 #endif // AXMenuListPopup_h |
OLD | NEW |