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

Side by Side Diff: Source/core/frame/Frame.h

Issue 551973005: Streamline frame detach (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999-2001 Lars Knoll <knoll@kde.org> 3 * 1999-2001 Lars Knoll <knoll@kde.org>
4 * 1999-2001 Antti Koivisto <koivisto@kde.org> 4 * 1999-2001 Antti Koivisto <koivisto@kde.org>
5 * 2000-2001 Simon Hausmann <hausmann@kde.org> 5 * 2000-2001 Simon Hausmann <hausmann@kde.org>
6 * 2000-2001 Dirk Mueller <mueller@kde.org> 6 * 2000-2001 Dirk Mueller <mueller@kde.org>
7 * 2000 Stefan Schimanski <1Stein@gmx.de> 7 * 2000 Stefan Schimanski <1Stein@gmx.de>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class WebLayer; 47 class WebLayer;
48 48
49 class Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame> { 49 class Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame> {
50 public: 50 public:
51 virtual bool isLocalFrame() const { return false; } 51 virtual bool isLocalFrame() const { return false; }
52 virtual bool isRemoteFrame() const { return false; } 52 virtual bool isRemoteFrame() const { return false; }
53 53
54 virtual ~Frame(); 54 virtual ~Frame();
55 virtual void trace(Visitor*); 55 virtual void trace(Visitor*);
56 56
57 virtual void detach() = 0; 57 virtual void detach();
58 void detachChildren(); 58 void detachChildren();
59 59
60 FrameClient* client() const; 60 FrameClient* client() const;
61 void clearClient();
62 61
63 // NOTE: Page is moving out of Blink up into the browser process as 62 // NOTE: Page is moving out of Blink up into the browser process as
64 // part of the site-isolation (out of process iframes) work. 63 // part of the site-isolation (out of process iframes) work.
65 // FrameHost should be used instead where possible. 64 // FrameHost should be used instead where possible.
66 Page* page() const; 65 Page* page() const;
67 FrameHost* host() const; // Null when the frame is detached. 66 FrameHost* host() const; // Null when the frame is detached.
68 67
69 bool isMainFrame() const; 68 bool isMainFrame() const;
70 bool isLocalRoot() const; 69 bool isLocalRoot() const;
71 70
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 private: 108 private:
110 FrameClient* m_client; 109 FrameClient* m_client;
111 WebLayer* m_remotePlatformLayer; 110 WebLayer* m_remotePlatformLayer;
112 }; 111 };
113 112
114 inline FrameClient* Frame::client() const 113 inline FrameClient* Frame::client() const
115 { 114 {
116 return m_client; 115 return m_client;
117 } 116 }
118 117
119 inline void Frame::clearClient()
120 {
121 m_client = 0;
122 }
123
124 inline LocalDOMWindow* Frame::domWindow() const 118 inline LocalDOMWindow* Frame::domWindow() const
125 { 119 {
126 return m_domWindow.get(); 120 return m_domWindow.get();
127 } 121 }
128 122
129 inline FrameOwner* Frame::owner() const 123 inline FrameOwner* Frame::owner() const
130 { 124 {
131 return m_owner; 125 return m_owner;
132 } 126 }
133 127
134 inline FrameTree& Frame::tree() const 128 inline FrameTree& Frame::tree() const
135 { 129 {
136 return m_treeNode; 130 return m_treeNode;
137 } 131 }
138 132
139 // Allow equality comparisons of Frames by reference or pointer, interchangeably . 133 // Allow equality comparisons of Frames by reference or pointer, interchangeably .
140 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) 134 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame)
141 135
142 } // namespace blink 136 } // namespace blink
143 137
144 #endif // Frame_h 138 #endif // Frame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698