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

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

Issue 1177333002: Revert of Detach old frame on WebFrame::swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/core/frame/Frame.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 class HTMLFrameOwnerElement; 48 class HTMLFrameOwnerElement;
49 class LayoutPart; 49 class LayoutPart;
50 class KURL; 50 class KURL;
51 class Page; 51 class Page;
52 class SecurityContext; 52 class SecurityContext;
53 class Settings; 53 class Settings;
54 class WindowProxy; 54 class WindowProxy;
55 class WindowProxyManager; 55 class WindowProxyManager;
56 struct FrameLoadRequest; 56 struct FrameLoadRequest;
57 57
58 enum class FrameDetachType { Remove, Swap };
59
60 // Status of user gesture. 58 // Status of user gesture.
61 enum class UserGestureStatus { Active, None }; 59 enum class UserGestureStatus { Active, None };
62 60
63 class CORE_EXPORT Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame > { 61 class CORE_EXPORT Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame > {
64 public: 62 public:
65 virtual ~Frame(); 63 virtual ~Frame();
66 64
67 DECLARE_VIRTUAL_TRACE(); 65 DECLARE_VIRTUAL_TRACE();
68 66
69 virtual bool isLocalFrame() const { return false; } 67 virtual bool isLocalFrame() const { return false; }
70 virtual bool isRemoteFrame() const { return false; } 68 virtual bool isRemoteFrame() const { return false; }
71 69
72 virtual DOMWindow* domWindow() const = 0; 70 virtual DOMWindow* domWindow() const = 0;
73 virtual WindowProxy* windowProxy(DOMWrapperWorld&) = 0; 71 virtual WindowProxy* windowProxy(DOMWrapperWorld&) = 0;
74 72
75 virtual void navigate(Document& originDocument, const KURL&, bool lockBackFo rwardList, UserGestureStatus) = 0; 73 virtual void navigate(Document& originDocument, const KURL&, bool lockBackFo rwardList, UserGestureStatus) = 0;
76 // This version of Frame::navigate assumes the resulting navigation is not 74 // This version of Frame::navigate assumes the resulting navigation is not
77 // to be started on a timer. Use the method above in such cases. 75 // to be started on a timer. Use the method above in such cases.
78 virtual void navigate(const FrameLoadRequest&) = 0; 76 virtual void navigate(const FrameLoadRequest&) = 0;
79 virtual void reload(FrameLoadType, ClientRedirectPolicy) = 0; 77 virtual void reload(FrameLoadType, ClientRedirectPolicy) = 0;
80 78
81 virtual void detach(FrameDetachType); 79 virtual void detach();
82 void detachChildren(); 80 void detachChildren();
83 virtual void disconnectOwnerElement(); 81 virtual void disconnectOwnerElement();
84 82
85 FrameClient* client() const; 83 FrameClient* client() const;
86 84
87 // NOTE: Page is moving out of Blink up into the browser process as 85 // NOTE: Page is moving out of Blink up into the browser process as
88 // part of the site-isolation (out of process iframes) work. 86 // part of the site-isolation (out of process iframes) work.
89 // FrameHost should be used instead where possible. 87 // FrameHost should be used instead where possible.
90 Page* page() const; 88 Page* page() const;
91 FrameHost* host() const; // Null when the frame is detached. 89 FrameHost* host() const; // Null when the frame is detached.
92 90
93 bool isMainFrame() const; 91 bool isMainFrame() const;
94 bool isLocalRoot() const; 92 bool isLocalRoot() const;
95 93
96 FrameOwner* owner() const; 94 FrameOwner* owner() const;
97 void setOwner(FrameOwner* owner) { m_owner = owner; } 95 void setOwner(FrameOwner* owner) { m_owner = owner; }
98 HTMLFrameOwnerElement* deprecatedLocalOwner() const; 96 HTMLFrameOwnerElement* deprecatedLocalOwner() const;
99 97
100 FrameTree& tree() const; 98 FrameTree& tree() const;
101 ChromeClient& chromeClient() const; 99 ChromeClient& chromeClient() const;
102 100
103 virtual SecurityContext* securityContext() const = 0; 101 virtual SecurityContext* securityContext() const = 0;
104 102
105 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); 103 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame);
106 Frame* findUnsafeParentScrollPropagationBoundary(); 104 Frame* findUnsafeParentScrollPropagationBoundary();
107 105
108 // This prepares the Frame for the next commit. It will detach children,
109 // dispatch unload events, abort XHR requests and detach the document.
110 // Returns true if the frame is ready to receive the next commit, or false
111 // otherwise.
112 virtual bool prepareForCommit() = 0;
113 void prepareSwapFrom(Frame*);
114 void finishSwapFrom(Frame*); 106 void finishSwapFrom(Frame*);
115 107
116 bool canNavigate(const Frame&); 108 bool canNavigate(const Frame&);
117 virtual void printNavigationErrorMessage(const Frame&, const char* reason) = 0; 109 virtual void printNavigationErrorMessage(const Frame&, const char* reason) = 0;
118 110
119 LayoutPart* ownerLayoutObject() const; // LayoutObject for the element that contains this frame. 111 LayoutPart* ownerLayoutObject() const; // LayoutObject for the element that contains this frame.
120 112
121 int64_t frameID() const { return m_frameID; } 113 int64_t frameID() const { return m_frameID; }
122 114
123 Settings* settings() const; // can be null 115 Settings* settings() const; // can be null
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 { 152 {
161 return m_treeNode; 153 return m_treeNode;
162 } 154 }
163 155
164 // Allow equality comparisons of Frames by reference or pointer, interchangeably . 156 // Allow equality comparisons of Frames by reference or pointer, interchangeably .
165 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) 157 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame)
166 158
167 } // namespace blink 159 } // namespace blink
168 160
169 #endif // Frame_h 161 #endif // Frame_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/Frame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698