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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 class Page; | 45 class Page; |
46 | 46 |
47 class CORE_EXPORT FocusController final : public NoBaseWillBeGarbageCollectedFin alized<FocusController> { | 47 class CORE_EXPORT FocusController final : public NoBaseWillBeGarbageCollectedFin alized<FocusController> { |
48 WTF_MAKE_NONCOPYABLE(FocusController); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOV ED(FocusController); | 48 WTF_MAKE_NONCOPYABLE(FocusController); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOV ED(FocusController); |
49 public: | 49 public: |
50 static PassOwnPtrWillBeRawPtr<FocusController> create(Page*); | 50 static PassOwnPtrWillBeRawPtr<FocusController> create(Page*); |
51 | 51 |
52 void setFocusedFrame(PassRefPtrWillBeRawPtr<Frame>); | 52 void setFocusedFrame(PassRefPtrWillBeRawPtr<Frame>); |
53 void focusDocumentView(PassRefPtrWillBeRawPtr<Frame>); | 53 void focusDocumentView(PassRefPtrWillBeRawPtr<Frame>); |
54 LocalFrame* focusedFrame() const; | 54 LocalFrame* focusedFrame() const; |
55 Frame* focusedFrameEvenIfRemote() const { return m_focusedFrame.get(); } | |
alexmos
2015/10/26 22:33:21
Name suggestions are very welcome. :) Now that fo
dcheng
2015/10/28 00:34:15
This is essentially what I had in mind. I can't th
| |
55 Frame* focusedOrMainFrame() const; | 56 Frame* focusedOrMainFrame() const; |
56 | 57 |
57 bool setInitialFocus(WebFocusType); | 58 bool setInitialFocus(WebFocusType); |
58 bool advanceFocus(WebFocusType type, InputDeviceCapabilities* sourceCapabili ties = nullptr) { return advanceFocus(type, false, sourceCapabilities); } | 59 bool advanceFocus(WebFocusType type, InputDeviceCapabilities* sourceCapabili ties = nullptr) { return advanceFocus(type, false, sourceCapabilities); } |
59 Element* findFocusableElement(WebFocusType, Node&); | 60 Element* findFocusableElement(WebFocusType, Node&); |
60 | 61 |
61 bool setFocusedElement(Element*, PassRefPtrWillBeRawPtr<Frame>, WebFocusType = WebFocusTypeNone, InputDeviceCapabilities* sourceCapabilities = nullptr); | 62 bool setFocusedElement(Element*, PassRefPtrWillBeRawPtr<Frame>, WebFocusType = WebFocusTypeNone, InputDeviceCapabilities* sourceCapabilities = nullptr); |
62 | 63 |
63 void setActive(bool); | 64 void setActive(bool); |
64 bool isActive() const { return m_isActive; } | 65 bool isActive() const { return m_isActive; } |
(...skipping 16 matching lines...) Expand all Loading... | |
81 RawPtrWillBeMember<Page> m_page; | 82 RawPtrWillBeMember<Page> m_page; |
82 RefPtrWillBeMember<Frame> m_focusedFrame; | 83 RefPtrWillBeMember<Frame> m_focusedFrame; |
83 bool m_isActive; | 84 bool m_isActive; |
84 bool m_isFocused; | 85 bool m_isFocused; |
85 bool m_isChangingFocusedFrame; | 86 bool m_isChangingFocusedFrame; |
86 }; | 87 }; |
87 | 88 |
88 } // namespace blink | 89 } // namespace blink |
89 | 90 |
90 #endif // FocusController_h | 91 #endif // FocusController_h |
OLD | NEW |