Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1205)

Unified Diff: Source/core/page/FocusController.h

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/page/FocusController.h
diff --git a/Source/core/page/FocusController.h b/Source/core/page/FocusController.h
index f12d1a0d738e38327a99abeefbd46d7ded4fe986..037ca534acfe2c3e7ca317978d8bc0aa4c7937e1 100644
--- a/Source/core/page/FocusController.h
+++ b/Source/core/page/FocusController.h
@@ -63,20 +63,20 @@ private:
RawPtrWillBeMember<TreeScope> m_rootTreeScope;
};
-class FocusController {
- WTF_MAKE_NONCOPYABLE(FocusController); WTF_MAKE_FAST_ALLOCATED;
+class FocusController FINAL : public NoBaseWillBeGarbageCollectedFinalized<FocusController> {
+ WTF_MAKE_NONCOPYABLE(FocusController); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
- static PassOwnPtr<FocusController> create(Page*);
+ static PassOwnPtrWillBeRawPtr<FocusController> create(Page*);
- void setFocusedFrame(PassRefPtr<Frame>);
- void focusDocumentView(PassRefPtr<Frame>);
+ void setFocusedFrame(PassRefPtrWillBeRawPtr<Frame>);
+ void focusDocumentView(PassRefPtrWillBeRawPtr<Frame>);
Frame* focusedFrame() const { return m_focusedFrame.get(); }
Frame* focusedOrMainFrame() const;
bool setInitialFocus(FocusType);
bool advanceFocus(FocusType type) { return advanceFocus(type, false); }
- bool setFocusedElement(Element*, PassRefPtr<Frame>, FocusType = FocusTypeNone);
+ bool setFocusedElement(Element*, PassRefPtrWillBeRawPtr<Frame>, FocusType = FocusTypeNone);
void setActive(bool);
bool isActive() const { return m_isActive; }
@@ -84,6 +84,8 @@ public:
void setFocused(bool);
bool isFocused() const { return m_isFocused; }
+ void trace(Visitor*);
+
private:
explicit FocusController(Page*);
@@ -114,8 +116,8 @@ private:
bool advanceFocusDirectionallyInContainer(Node* container, const LayoutRect& startingRect, FocusType);
void findFocusCandidateInContainer(Node& container, const LayoutRect& startingRect, FocusType, FocusCandidate& closest);
- Page* m_page;
- RefPtr<Frame> m_focusedFrame;
+ RawPtrWillBeMember<Page> m_page;
+ RefPtrWillBeMember<Frame> m_focusedFrame;
bool m_isActive;
bool m_isFocused;
bool m_isChangingFocusedFrame;

Powered by Google App Engine
This is Rietveld 408576698