Chromium Code Reviews| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 | 70 |
| 71 void setFocusedFrame(PassRefPtr<Frame>); | 71 void setFocusedFrame(PassRefPtr<Frame>); |
| 72 void focusDocumentView(PassRefPtr<Frame>); | 72 void focusDocumentView(PassRefPtr<Frame>); |
| 73 Frame* focusedFrame() const { return m_focusedFrame.get(); } | 73 Frame* focusedFrame() const { return m_focusedFrame.get(); } |
| 74 Frame* focusedOrMainFrame() const; | 74 Frame* focusedOrMainFrame() const; |
| 75 | 75 |
| 76 bool setInitialFocus(FocusType); | 76 bool setInitialFocus(FocusType); |
| 77 bool advanceFocus(FocusType type) { return advanceFocus(type, false); } | 77 bool advanceFocus(FocusType type) { return advanceFocus(type, false); } |
| 78 | 78 |
| 79 bool setFocusedElement(Element*, PassRefPtr<Frame>, FocusType = FocusTypeNon e); | 79 bool setFocusedElement(Element*, PassRefPtr<Frame>, FocusType = FocusTypeNon e); |
| 80 bool setWasFocusedByMouse(bool); | |
| 81 bool wasFocusedByMouse() const { return m_wasFocusedByMouse; } | |
| 80 | 82 |
| 81 void setActive(bool); | 83 void setActive(bool); |
| 82 bool isActive() const { return m_isActive; } | 84 bool isActive() const { return m_isActive; } |
| 83 | 85 |
| 84 void setFocused(bool); | 86 void setFocused(bool); |
| 85 bool isFocused() const { return m_isFocused; } | 87 bool isFocused() const { return m_isFocused; } |
| 86 | 88 |
| 87 private: | 89 private: |
| 88 explicit FocusController(Page*); | 90 explicit FocusController(Page*); |
| 89 | 91 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 109 Node* nextFocusableNode(FocusNavigationScope, Node* start); | 111 Node* nextFocusableNode(FocusNavigationScope, Node* start); |
| 110 Node* previousFocusableNode(FocusNavigationScope, Node* start); | 112 Node* previousFocusableNode(FocusNavigationScope, Node* start); |
| 111 | 113 |
| 112 Node* findNodeWithExactTabIndex(Node* start, int tabIndex, FocusType); | 114 Node* findNodeWithExactTabIndex(Node* start, int tabIndex, FocusType); |
| 113 | 115 |
| 114 bool advanceFocusDirectionallyInContainer(Node* container, const LayoutRect& startingRect, FocusType); | 116 bool advanceFocusDirectionallyInContainer(Node* container, const LayoutRect& startingRect, FocusType); |
| 115 void findFocusCandidateInContainer(Node& container, const LayoutRect& starti ngRect, FocusType, FocusCandidate& closest); | 117 void findFocusCandidateInContainer(Node& container, const LayoutRect& starti ngRect, FocusType, FocusCandidate& closest); |
| 116 | 118 |
| 117 Page* m_page; | 119 Page* m_page; |
| 118 RefPtr<Frame> m_focusedFrame; | 120 RefPtr<Frame> m_focusedFrame; |
| 121 bool m_wasFocusedByMouse; | |
|
pdr.
2014/08/12 02:02:22
It may be clearer to rename this "m_elementWasFocu
| |
| 119 bool m_isActive; | 122 bool m_isActive; |
| 120 bool m_isFocused; | 123 bool m_isFocused; |
| 121 bool m_isChangingFocusedFrame; | 124 bool m_isChangingFocusedFrame; |
| 122 }; | 125 }; |
| 123 | 126 |
| 124 } // namespace blink | 127 } // namespace blink |
| 125 | 128 |
| 126 #endif // FocusController_h | 129 #endif // FocusController_h |
| OLD | NEW |