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

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

Issue 1041473002: 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') | Source/core/loader/FrameLoader.cpp » ('J')
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 class FrameOwner; 46 class FrameOwner;
47 class HTMLFrameOwnerElement; 47 class HTMLFrameOwnerElement;
48 class LayoutPart; 48 class LayoutPart;
49 class KURL; 49 class KURL;
50 class Page; 50 class Page;
51 class SecurityContext; 51 class SecurityContext;
52 class Settings; 52 class Settings;
53 class WindowProxy; 53 class WindowProxy;
54 class WindowProxyManager; 54 class WindowProxyManager;
55 55
56 enum class FrameDetachType { Remove,
dcheng 2015/06/08 19:34:42 This is wrapped weird. Just put it all on one line
lfg 2015/06/10 18:41:28 git cl format did this :(. Fixed.
57 Swap };
58
56 // Status of user gesture. 59 // Status of user gesture.
57 enum class UserGestureStatus { Active, None }; 60 enum class UserGestureStatus { Active, None };
58 61
59 class CORE_EXPORT Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame > { 62 class CORE_EXPORT Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame > {
60 public: 63 public:
61 virtual ~Frame(); 64 virtual ~Frame();
62 65
63 DECLARE_VIRTUAL_TRACE(); 66 DECLARE_VIRTUAL_TRACE();
64 67
65 virtual bool isLocalFrame() const { return false; } 68 virtual bool isLocalFrame() const { return false; }
66 virtual bool isRemoteFrame() const { return false; } 69 virtual bool isRemoteFrame() const { return false; }
67 70
68 virtual DOMWindow* domWindow() const = 0; 71 virtual DOMWindow* domWindow() const = 0;
69 virtual WindowProxy* windowProxy(DOMWrapperWorld&) = 0; 72 virtual WindowProxy* windowProxy(DOMWrapperWorld&) = 0;
70 73
71 virtual void navigate(Document& originDocument, const KURL&, bool lockBackFo rwardList, UserGestureStatus) = 0; 74 virtual void navigate(Document& originDocument, const KURL&, bool lockBackFo rwardList, UserGestureStatus) = 0;
72 virtual void reload(ReloadPolicy, ClientRedirectPolicy) = 0; 75 virtual void reload(ReloadPolicy, ClientRedirectPolicy) = 0;
73 76
74 virtual void detach(); 77 virtual void detach(FrameDetachType);
75 void detachChildren(); 78 void detachChildren();
76 virtual void disconnectOwnerElement(); 79 virtual void disconnectOwnerElement();
77 80
78 FrameClient* client() const; 81 FrameClient* client() const;
79 82
80 // NOTE: Page is moving out of Blink up into the browser process as 83 // NOTE: Page is moving out of Blink up into the browser process as
81 // part of the site-isolation (out of process iframes) work. 84 // part of the site-isolation (out of process iframes) work.
82 // FrameHost should be used instead where possible. 85 // FrameHost should be used instead where possible.
83 Page* page() const; 86 Page* page() const;
84 FrameHost* host() const; // Null when the frame is detached. 87 FrameHost* host() const; // Null when the frame is detached.
85 88
86 bool isMainFrame() const; 89 bool isMainFrame() const;
87 bool isLocalRoot() const; 90 bool isLocalRoot() const;
88 91
89 FrameOwner* owner() const; 92 FrameOwner* owner() const;
90 void setOwner(FrameOwner* owner) { m_owner = owner; } 93 void setOwner(FrameOwner* owner) { m_owner = owner; }
91 HTMLFrameOwnerElement* deprecatedLocalOwner() const; 94 HTMLFrameOwnerElement* deprecatedLocalOwner() const;
92 95
93 FrameTree& tree() const; 96 FrameTree& tree() const;
94 ChromeClient& chromeClient() const; 97 ChromeClient& chromeClient() const;
95 98
96 virtual SecurityContext* securityContext() const = 0; 99 virtual SecurityContext* securityContext() const = 0;
97 100
98 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); 101 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame);
99 Frame* findUnsafeParentScrollPropagationBoundary(); 102 Frame* findUnsafeParentScrollPropagationBoundary();
100 103
104 void prepareSwapFrom(Frame*);
101 void finishSwapFrom(Frame*); 105 void finishSwapFrom(Frame*);
102 106
103 bool canNavigate(const Frame&); 107 bool canNavigate(const Frame&);
104 virtual void printNavigationErrorMessage(const Frame&, const char* reason) = 0; 108 virtual void printNavigationErrorMessage(const Frame&, const char* reason) = 0;
105 109
106 LayoutPart* ownerLayoutObject() const; // LayoutObject for the element that contains this frame. 110 LayoutPart* ownerLayoutObject() const; // LayoutObject for the element that contains this frame.
107 111
108 int64_t frameID() const { return m_frameID; } 112 int64_t frameID() const { return m_frameID; }
109 113
110 Settings* settings() const; // can be null 114 Settings* settings() const; // can be null
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 { 151 {
148 return m_treeNode; 152 return m_treeNode;
149 } 153 }
150 154
151 // Allow equality comparisons of Frames by reference or pointer, interchangeably . 155 // Allow equality comparisons of Frames by reference or pointer, interchangeably .
152 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) 156 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame)
153 157
154 } // namespace blink 158 } // namespace blink
155 159
156 #endif // Frame_h 160 #endif // Frame_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/Frame.cpp » ('j') | Source/core/loader/FrameLoader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698