| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 InputDeviceCapabilities* sourceCapabilities = nullptr) { | 76 InputDeviceCapabilities* sourceCapabilities = nullptr) { |
| 77 return advanceFocus(type, false, sourceCapabilities); | 77 return advanceFocus(type, false, sourceCapabilities); |
| 78 } | 78 } |
| 79 bool advanceFocusAcrossFrames( | 79 bool advanceFocusAcrossFrames( |
| 80 WebFocusType, | 80 WebFocusType, |
| 81 RemoteFrame* from, | 81 RemoteFrame* from, |
| 82 LocalFrame* to, | 82 LocalFrame* to, |
| 83 InputDeviceCapabilities* sourceCapabilities = nullptr); | 83 InputDeviceCapabilities* sourceCapabilities = nullptr); |
| 84 Element* findFocusableElementInShadowHost(const Element& shadowHost); | 84 Element* findFocusableElementInShadowHost(const Element& shadowHost); |
| 85 | 85 |
| 86 Element* findFocusableElement(WebFocusType, Element&); |
| 87 |
| 86 bool setFocusedElement(Element*, Frame*, const FocusParams&); | 88 bool setFocusedElement(Element*, Frame*, const FocusParams&); |
| 87 // |setFocusedElement| variant with SelectionBehaviorOnFocus::None, | 89 // |setFocusedElement| variant with SelectionBehaviorOnFocus::None, |
| 88 // |WebFocusTypeNone, and null InputDeviceCapabilities. | 90 // |WebFocusTypeNone, and null InputDeviceCapabilities. |
| 89 bool setFocusedElement(Element*, Frame*); | 91 bool setFocusedElement(Element*, Frame*); |
| 90 | 92 |
| 91 void setActive(bool); | 93 void setActive(bool); |
| 92 bool isActive() const { return m_isActive; } | 94 bool isActive() const { return m_isActive; } |
| 93 | 95 |
| 94 void setFocused(bool); | 96 void setFocused(bool); |
| 95 bool isFocused() const { return m_isFocused; } | 97 bool isFocused() const { return m_isFocused; } |
| 96 | 98 |
| 97 void registerFocusChangedObserver(FocusChangedObserver*); | 99 void registerFocusChangedObserver(FocusChangedObserver*); |
| 98 | 100 |
| 99 DECLARE_TRACE(); | 101 DECLARE_TRACE(); |
| 100 | 102 |
| 101 private: | 103 private: |
| 102 explicit FocusController(Page*); | 104 explicit FocusController(Page*); |
| 103 | 105 |
| 104 Element* findFocusableElement(WebFocusType, Element&); | |
| 105 | |
| 106 bool advanceFocus(WebFocusType, | 106 bool advanceFocus(WebFocusType, |
| 107 bool initialFocus, | 107 bool initialFocus, |
| 108 InputDeviceCapabilities* sourceCapabilities = nullptr); | 108 InputDeviceCapabilities* sourceCapabilities = nullptr); |
| 109 bool advanceFocusDirectionally(WebFocusType); | 109 bool advanceFocusDirectionally(WebFocusType); |
| 110 bool advanceFocusInDocumentOrder(LocalFrame*, | 110 bool advanceFocusInDocumentOrder(LocalFrame*, |
| 111 Element* start, | 111 Element* start, |
| 112 WebFocusType, | 112 WebFocusType, |
| 113 bool initialFocus, | 113 bool initialFocus, |
| 114 InputDeviceCapabilities* sourceCapabilities); | 114 InputDeviceCapabilities* sourceCapabilities); |
| 115 | 115 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 127 Member<Frame> m_focusedFrame; | 127 Member<Frame> m_focusedFrame; |
| 128 bool m_isActive; | 128 bool m_isActive; |
| 129 bool m_isFocused; | 129 bool m_isFocused; |
| 130 bool m_isChangingFocusedFrame; | 130 bool m_isChangingFocusedFrame; |
| 131 HeapHashSet<WeakMember<FocusChangedObserver>> m_focusChangedObservers; | 131 HeapHashSet<WeakMember<FocusChangedObserver>> m_focusChangedObservers; |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace blink | 134 } // namespace blink |
| 135 | 135 |
| 136 #endif // FocusController_h | 136 #endif // FocusController_h |
| OLD | NEW |